@@ -316,6 +316,45 @@ def test_window_options(
316
316
w .select_layout (wconf ["layout" ])
317
317
318
318
319
+ def test_regression_00915_pane_with_hyphen_t_target (
320
+ tmp_path : pathlib .Path ,
321
+ server : "Server" ,
322
+ capsys : pytest .CaptureFixture [str ],
323
+ ) -> None :
324
+ """Regression test for send_keys in pane starting with -t."""
325
+ yaml_config = (
326
+ FIXTURE_PATH
327
+ / "workspace/builder"
328
+ / "regression_send_keys_with_hyphen_t_00915.yaml"
329
+ )
330
+ workspace = ConfigReader ._from_file (yaml_config )
331
+ workspace = loader .expand (workspace )
332
+
333
+ builder = WorkspaceBuilder (session_config = workspace , server = server )
334
+ builder .build ()
335
+
336
+ session = builder .session
337
+ assert session is not None
338
+
339
+ window = session .active_window
340
+
341
+ assert window is not None
342
+
343
+ pane_1 = window .panes [0 ]
344
+ assert "t - This echo's correctly." in pane_1 .cmd ("capture-pane" , "-p" ).stdout [0 ]
345
+
346
+ pane_2 = window .panes [1 ]
347
+ assert (
348
+ "-a - This also echo's correctly." in pane_2 .cmd ("capture-pane" , "-p" ).stdout [0 ]
349
+ )
350
+
351
+ pane_3 = window .panes [2 ]
352
+ assert (
353
+ "-t - This is never sent to the pane and instead printed to the current shell."
354
+ in pane_3 .cmd ("capture-pane" , "-p" ).stdout [0 ]
355
+ )
356
+
357
+
319
358
@pytest .mark .flaky (reruns = 5 )
320
359
def test_window_options_after (
321
360
session : Session ,
0 commit comments