summaryrefslogtreecommitdiff
path: root/test/snapshots/nested.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-09 02:34:49 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit0a15af8d98771180e32402e68ea844f9f377cefb (patch)
tree8f919ba30dd304c4654e4abf127c238f05458000 /test/snapshots/nested.snap
parent09c35b22793153d201fa202b52671a6442e5e2e1 (diff)
downloadpardes-0a15af8d98771180e32402e68ea844f9f377cefb.tar.gz
pardes-0a15af8d98771180e32402e68ea844f9f377cefb.zip
a pardes launched inside pardes hands its file to the outer one
Diffstat (limited to 'test/snapshots/nested.snap')
-rw-r--r--test/snapshots/nested.snap48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/snapshots/nested.snap b/test/snapshots/nested.snap
new file mode 100644
index 00000000..0beeabf8
--- /dev/null
+++ b/test/snapshots/nested.snap
@@ -0,0 +1,48 @@
+# a pardes launched INSIDE a pardes hands its argument to the outer one.
+#
+# No harness support is needed to get a genuinely nested launch: a pane
+# shell's parent IS the app under test, so `$(readlink /proc/$PPID/exe)` in a
+# pane is this exact binary, and running it from there makes a real
+# descendant — the same process tree a person typing `pardes foo.txt` in a
+# pane produces. Each arm gets its own `start` so the Look never has to be
+# aimed at a pane a previous arm moved.
+#
+# What discriminates is the GOLDEN GRID, not the `wait` below it: a nested
+# pardes that opened its own UI in the pane would show the same file, so the
+# content wait passes either way. The layout is what differs — an outer file
+# pane beside the shell versus a whole second topbar inside it — and the
+# `cursor=` on the first arm's header moves the moment that changes.
+#
+# Long waits on purpose: this forks and execs a whole second pardes.
+dirmk nestdir
+file nestdir/inside-nested.txt marker
+file nested.txt hello-from-nested\nsecond-nested-line\n
+# --- a FILE argument: a file pane appears in the OUTER instance ---
+start 30 100
+wait 8000 $
+stable 700 20000
+text $(readlink /proc/$PPID/exe) nested.txt
+key enter
+# the CONTENT, not the border: the shell only ever echoed the file's NAME
+# (see above for why the grid, not this line, is the real assertion)
+wait 15000 hello-from-nested
+stable 700 20000
+snap file-arg
+# --- no argument: the spicy message, in the pane, and no second UI ---
+start 30 100
+wait 8000 $
+stable 700 20000
+text $(readlink /proc/$PPID/exe)
+key enter
+wait 15000 already inside pardes
+stable 700 20000
+snap no-arg
+# --- a DIRECTORY argument: a shell there, greeted with ls ---
+start 30 100
+wait 8000 $
+stable 700 20000
+text $(readlink /proc/$PPID/exe) nestdir
+key enter
+wait 15000 inside-nested.txt
+stable 700 20000
+snap dir-arg