mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-16 03:09:33 +01:00
fix(test): pin that a deleted pane directory is not adopted on rediscovery
Merge-time fix for #667. tmux reports the directory of a pane whose directory was deleted while it ran as `/path (deleted)` (tmux 3.4 on Linux). Today the rediscovered session falls back to the server cwd only because isValidPath() rejects the parentheses; this row in the wiring test keeps a later relaxation of the path pattern from quietly adopting a dead directory. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ced88b3310
commit
6d1a542018
1 file changed
+5
@@ -931,6 +931,9 @@ describe('TmuxManager (unit)', () => {
|
||||
'codeman-dddd4444|105|0|||',
|
||||
// The launch directory every pane starts in; a remote or docker pane never leaves it.
|
||||
'codeman-eeee5555|106|0|||/tmp',
|
||||
// A directory deleted while its pane ran, as tmux 3.4 on Linux reports it. isValidPath()
|
||||
// rejects it for the parentheses; a relaxed path pattern must not adopt a dead directory.
|
||||
'codeman-abcd7777|108|0|||/home/user/gone (deleted)',
|
||||
// Last row, path ending in a space: the output must not be trimmed.
|
||||
'codeman-ffff6666|107|0|||/home/user/trailing ',
|
||||
].join('\n');
|
||||
@@ -948,6 +951,7 @@ describe('TmuxManager (unit)', () => {
|
||||
'restored-cccc3333',
|
||||
'restored-dddd4444',
|
||||
'restored-eeee5555',
|
||||
'restored-abcd7777',
|
||||
'restored-ffff6666',
|
||||
]);
|
||||
const dirs = Object.fromEntries(nonTestManager.getSessions().map((s) => [s.muxName, s.workingDir]));
|
||||
@@ -957,6 +961,7 @@ describe('TmuxManager (unit)', () => {
|
||||
'codeman-cccc3333': process.cwd(),
|
||||
'codeman-dddd4444': process.cwd(),
|
||||
'codeman-eeee5555': process.cwd(),
|
||||
'codeman-abcd7777': process.cwd(),
|
||||
'codeman-ffff6666': '/home/user/trailing ',
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user