summaryrefslogtreecommitdiff
path: root/test/snapshots/tty.snap
blob: 48fffbd151c8d28843bf319e98097a71ad0b292e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# tty mode round-trip: Ctrl-b in, run a command, Ctrl-b out. Ctrl-b is the one
# switch between raw and normal. Shift-Esc (CSI 27;2u — needs a host that
# reports modifiers on Escape) never switches: in every mode it is what Escape
# is in normal mode — Last, the pane you were in before this one — and a raw
# terminal stays raw. The hop itself is covered by a unit test in pardes.zig.
file m.txt marker
start 31 100 -n 3
wait 8000 m.txt
stable 700 20000
key c-b
stable 600 8000
snap tty-on
text echo SNAP''OK
key enter
wait 8000 SNAPOK
stable 700 10000
snap tty-echo
key c-b
stable 600 8000
snap tty-off
# Shift-Esc from normal: never into raw; it backs out to the previous pane.
send \e[27;2u
stable 600 8000
snap shift-esc-normal
# Ctrl-b is the switch: into raw, and out again.
key c-b
stable 600 8000
snap ctrl-b-on
key c-b
stable 600 8000
snap ctrl-b-off