Skip to content

Commit 8446505

Browse files
committed
Add tests for window and pane
1 parent 8af066a commit 8446505

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/test_cli.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,30 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
437437
[],
438438
'True',
439439
),
440+
(
441+
[
442+
'shell',
443+
'-L{SOCKET_NAME}',
444+
'{SESSION_NAME}',
445+
'{WINDOW_NAME}',
446+
'-c',
447+
'print(window.name)',
448+
],
449+
[],
450+
'{WINDOW_NAME}',
451+
),
452+
(
453+
[
454+
'shell',
455+
'-L{SOCKET_NAME}',
456+
'{SESSION_NAME}',
457+
'{WINDOW_NAME}',
458+
'-c',
459+
'print(pane.id)',
460+
],
461+
[],
462+
'{PANE_ID}',
463+
),
440464
],
441465
)
442466
def test_shell(cli_args, inputs, expected_output, tmpdir, monkeypatch, server, session):
@@ -450,6 +474,7 @@ def test_shell(cli_args, inputs, expected_output, tmpdir, monkeypatch, server, s
450474
SOCKET_PATH=server.socket_path,
451475
SESSION_NAME=session.name,
452476
WINDOW_NAME=window_name,
477+
PANE_ID=window.attached_pane.id,
453478
SERVER_SOCKET_NAME=server.socket_name,
454479
)
455480

0 commit comments

Comments
 (0)