summaryrefslogtreecommitdiff
path: root/test/snapshots/savepane.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-25 11:05:21 -0300
committerGabriel Schneider <[email protected]>2026-08-25 12:28:58 -0300
commite5f9e172330bc4500995ddd5954ed94f94e07af6 (patch)
treeaa7c5079b4c2951cef5b5c15595d0b20bc3ae245 /test/snapshots/savepane.snap
parent6f48508aa08396bcf9dd4da2cab1d221bcc53f78 (diff)
downloadpardes-e5f9e172330bc4500995ddd5954ed94f94e07af6.tar.gz
pardes-e5f9e172330bc4500995ddd5954ed94f94e07af6.zip
tests: a capture is a delta and a click names its word, so a tagline edit stops rewriting the suite
Diffstat (limited to 'test/snapshots/savepane.snap')
-rw-r--r--test/snapshots/savepane.snap33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/snapshots/savepane.snap b/test/snapshots/savepane.snap
new file mode 100644
index 00000000..f5a3b9e2
--- /dev/null
+++ b/test/snapshots/savepane.snap
@@ -0,0 +1,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 30 100 -n 1
+wait 8000 New Newcol
+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