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