Skip to content

Commit d98f346

Browse files
committed
✅ Test send_keys literal / non-literal
1 parent a5c93c3 commit d98f346

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_pane.py

+11
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ def test_resize_pane(session):
2525
assert int(pane1['pane_height']) == 3
2626

2727

28+
def test_send_keys(session):
29+
pane = session.attached_window.attached_pane
30+
pane.send_keys('c-c', literal=True)
31+
32+
pane_contents = '\n'.join(pane.cmd('capture-pane', '-p').stdout)
33+
assert 'c-c' in pane_contents
34+
35+
pane.send_keys('c-a', literal=False)
36+
assert 'c-a' not in pane_contents, 'should not print to pane'
37+
38+
2839
def test_set_height(session):
2940
window = session.new_window(window_name='test_set_height')
3041
window.split_window()

0 commit comments

Comments
 (0)