mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 10:59:32 +01:00
test(tui): check the TUI pid option is unset in a way tmux 3.2a agrees with
An unset user option makes `show-options -gv` exit 1 on newer tmux but print nothing and exit 0 on 3.2a (Ubuntu 22.04), so the disarm assertion failed there although the option was gone. Assert on the global listing instead, which omits an unset option on both.
This commit is contained in:
1 parent
f1f7eec4d6
commit
d5a5468b02
1 file changed
+3
-1
@@ -236,7 +236,9 @@ describe.skipIf(!hasTmux)('TUI M-1..M-9 switch only the attaching client', () =>
|
||||
await client.unbindSwitchKey('M-2', tty);
|
||||
await client.disarmTuiSwitchGuard(tty);
|
||||
expect(run(['list-keys', '-T', 'root'])).not.toContain(`switch-client -t ${beta}`);
|
||||
expect(() => run(['show-options', '-gv', '@codeman-tui-pid'])).toThrow();
|
||||
// The listing, not `show-options -gv`: an unset user option is an error on
|
||||
// tmux 3.5 but empty output and exit 0 on 3.2a.
|
||||
expect(run(['show-options', '-g'])).not.toContain('@codeman-tui-pid');
|
||||
|
||||
// A hook armed for a tty this one is a prefix of (pts/4 vs pts/41) is
|
||||
// another TUI's, and this tty's disarm must leave it.
|
||||
|
||||
Reference in new issue
Block a user