summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-08 05:35:09 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit146944accb5852c548e25c7194b2865531e67cbb (patch)
tree532be12c0e5b4c8ff8bfafc6712f7011fd98784b /test
parent2826704c7f829b5b5375ed2bf7414b455d3b0735 (diff)
downloadpardes-146944accb5852c548e25c7194b2865531e67cbb.tar.gz
pardes-146944accb5852c548e25c7194b2865531e67cbb.zip
argv positionals: bare pardes boots the shell pane in tty mode, a FILE arg (file:LINE works) opens it focused in the left column with a greeting terminal on the launch dir at right, a DIRECTORY arg chdirs so shells spawn there. New argv.snap; boot/restore.snap pin -n 1 to keep the classic boot.
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/argv.golden93
-rw-r--r--test/snapshots/argv.snap26
-rw-r--r--test/snapshots/boot.snap4
-rw-r--r--test/snapshots/restore.snap2
4 files changed, 122 insertions, 3 deletions
diff --git a/test/snapshots/argv.golden b/test/snapshots/argv.golden
new file mode 100644
index 00000000..76aa776a
--- /dev/null
+++ b/test/snapshots/argv.golden
@@ -0,0 +1,93 @@
+== snap noargs grid=100x30 cursor=4,4
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| TTY /tmp/pardes-snap/argv/cwd Del
+| $ echo ARGV''TTY
+| ARGVTTY
+| $
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap filearg grid=100x30 cursor=7,2
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/argv/cwd/notes.txt Save Del NOR /tmp/pardes-snap/argv/cwd Del
+| 3 line 3
+| 4 line 4 notes.txt zmarker.txt
+| 5 line 5
+| 6 line 6
+| 7 line 7
+| 8 line 8
+| 9
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap dirarg grid=100x30 cursor=4,4
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/argv/cwd/sub Del
+|
+| inside.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
diff --git a/test/snapshots/argv.snap b/test/snapshots/argv.snap
new file mode 100644
index 00000000..1c3c9f78
--- /dev/null
+++ b/test/snapshots/argv.snap
@@ -0,0 +1,26 @@
+# argv: bare `pardes` boots one shell already in tty mode; a FILE argument
+# opens it focused in the left column (file:LINE scrolls there) with a
+# terminal greeting on the launch dir in the right; a DIRECTORY argument
+# becomes the cwd the shell spawns in
+lines notes.txt 8
+file zmarker.txt x
+start 30 100
+wait 8000 $
+stable 700 20000
+text echo ARGV''TTY
+key enter
+wait 8000 ARGVTTY
+stable 700 10000
+snap noargs
+start 30 100 notes.txt:3
+wait 8000 Kill Newcol
+wait 8000 zmarker.txt
+stable 700 20000
+snap filearg
+dirmk sub
+file sub/inside.txt marker
+start 30 100 sub
+wait 8000 Kill Newcol
+wait 8000 inside.txt
+stable 700 20000
+snap dirarg
diff --git a/test/snapshots/boot.snap b/test/snapshots/boot.snap
index 33b12be0..b51932bf 100644
--- a/test/snapshots/boot.snap
+++ b/test/snapshots/boot.snap
@@ -1,6 +1,6 @@
-# default startup: 2 columns, 3 shells, each greets with ls; prompts hidden
+# -n 1: one shell pane in normal mode, greets with ls; prompts hidden
file hello.txt marker-content
-start 30 100
+start 30 100 -n 1
wait 8000 Kill Newcol
wait 8000 hello.txt
stable 700 20000
diff --git a/test/snapshots/restore.snap b/test/snapshots/restore.snap
index 8a677877..815edc55 100644
--- a/test/snapshots/restore.snap
+++ b/test/snapshots/restore.snap
@@ -2,7 +2,7 @@
# under ~/.local/share/pardes in live runs) and the topbar grows Restore <path>;
# middle-click Restore loads that dump back into the live session: output on
# screen at Dump time survives (pty history), later output does not
-start 30 100
+start 30 100 -n 1
wait 8000 Kill Newcol
stable 700 20000
key c-b