File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ def test_control_client_lists_control_flag(
119119 )
120120 proto .register_command (list_ctx )
121121 proc .stdin .write ('list-clients -F"#{client_pid} #{client_flags} #{session_name}"\n ' )
122+ # Register detach to avoid protocol error on trailing %begin/%end
123+ detach_ctx = CommandContext (argv = ["tmux" , "detach-client" ])
124+ proto .register_command (detach_ctx )
122125 proc .stdin .write ("detach-client\n " )
123126 proc .stdin .flush ()
124127
@@ -129,5 +132,7 @@ def test_control_client_lists_control_flag(
129132 assert list_ctx .done .wait (timeout = 0.5 )
130133 result = proto .build_result (list_ctx )
131134 assert any (
132- len (parts := line .split ()) >= 2 and "C" in parts [1 ] for line in result .stdout
135+ len (parts := line .split ()) >= 2
136+ and ("C" in parts [1 ] or "control-mode" in parts [1 ])
137+ for line in result .stdout
133138 )
You can’t perform that action at this time.
0 commit comments