summaryrefslogtreecommitdiff
path: root/test/snapshots/savepane.snap
blob: 58df13ef667435e7543d528ca82b5564fbc3c9bd (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
32
33
# `Save` with NO argument on a +New scratch: the prompt is drawn in the tag,
# prefilled with the pane's own directory, and submitting it turns the scratch
# into an ordinary file pane whose bytes are on disk.
#
# config.zig's save_marker is rendered in no other golden in the suite. Ten
# unit tests assert the STRING startSavePrompt builds (pardes.zig's "Save on a
# scratch asks for a path in its inherited dir and makes it a file"); none of
# them can see it drawn, land on the tag rather than the message row, or show
# what the pane becomes afterwards. That is what this script is for.
start 31 100 -n 1
wait 8000 Newcol Joincol
stable 700 20000
# a scratch of our own, with something in it to save
key space f n
stable 400 5000
key i
text scratch bytes
key esc
settle 100
stable 400 5000
snap scratch
# Save, no argument: the tag gains the armed ` Save <dir>/` prompt, and the
# pane is still the scratch — nothing is written until the path is submitted
key space f s
stable 400 5000
snap prompt
# name it: the prompt submits, the pane becomes that file (its tag is the path,
# and the `*` is gone because what is on screen is what is on disk)
text saved.txt
key enter
stable 700 15000
snap saved
snapfile bytes saved.txt