We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c0d700 commit 162eaf9Copy full SHA for 162eaf9
tests/test_pane.py
@@ -63,3 +63,17 @@ def test_set_width(session: Session) -> None:
63
assert int(pane1["pane_width"]) == 10
64
65
pane1.reset()
66
+
67
+def test_capture_pane(session: Session) -> None:
68
+ session.new_window(
69
+ attach=True,
70
+ window_name="capture_pane",
71
+ window_shell='env -i PS1="$ " /usr/bin/env bash --norc --noprofile'
72
+ )
73
+ pane = session.attached_window.attached_pane
74
+ assert pane is not None
75
+ pane_contents = "\n".join(pane.capture_pane())
76
+ assert pane_contents == '$'
77
+ pane.send_keys(r'printf "\n%s\n" "Hello World !"', literal=True, suppress_history=False)
78
79
+ assert pane_contents == r'$ printf "\n%s\n" "Hello World !"{}'.format('\n\nHello World !\n$')
0 commit comments