diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-05 19:32:30 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-10 09:17:07 -0300 |
| commit | 8aafc3fa24c7475a07259eb06cd5d217f510df98 (patch) | |
| tree | 62115e1ef1f15c57022060124c5ff934b778e169 /test/snapshots | |
| parent | 30a44a55232b829866bc3554647de21929276d1a (diff) | |
| download | pardes-8aafc3fa24c7475a07259eb06cd5d217f510df98.tar.gz pardes-8aafc3fa24c7475a07259eb06cd5d217f510df98.zip | |
add a Shell builtin, default fish, with per-family prompt integration
Diffstat (limited to 'test/snapshots')
| -rw-r--r-- | test/snapshots/builtins.golden | 8 | ||||
| -rw-r--r-- | test/snapshots/shellset.golden | 63 | ||||
| -rw-r--r-- | test/snapshots/shellset.snap | 43 |
3 files changed, 110 insertions, 4 deletions
diff --git a/test/snapshots/builtins.golden b/test/snapshots/builtins.golden index 36a7b2d9..08c701d7 100644 --- a/test/snapshots/builtins.golden +++ b/test/snapshots/builtins.golden @@ -153,7 +153,6 @@ | | | /tmp/pardes-snap/builtins/cwd/+Help New Del -| 24 SPC l i Lspinfo | 25 SPC l k Hover | 26 SPC l r Rename | 27 SPC l s Symbols @@ -180,7 +179,8 @@ | 48 Look enter, right-click | 49 Exec tab, middle-click | 50 Theme -| 51 +| 51 Shell +| 52 == snap not-a-picker grid=120x60 cursor=7,58 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/builtins/cwd/notes.txt Save New Del @@ -214,7 +214,6 @@ | | | /tmp/pardes-snap/builtins/cwd/+Help New Del -| 24 SPC l i Lspinfo | 25 SPC l k Hover | 26 SPC l r Rename | 27 SPC l s Symbols @@ -241,7 +240,8 @@ | 48 Look enter, right-click | 49 Exec tab, middle-click | 50 Theme -| 51 +| 51 Shell +| 52 == snap window-group grid=120x60 cursor=7,32 |New Newcol Find Grep Help Tutor Dump NextColor Debug Kill | /tmp/pardes-snap/builtins/cwd/notes.txt Save New Del diff --git a/test/snapshots/shellset.golden b/test/snapshots/shellset.golden new file mode 100644 index 00000000..330d21dc --- /dev/null +++ b/test/snapshots/shellset.golden @@ -0,0 +1,63 @@ +== snap boot grid=90x20 cursor=7,2 +|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill +| /tmp/pardes-snap/shellset/cwd/cmd.txt Save New Del +| 1 Shell zznosuchshell +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap builtin-ran grid=90x20 cursor=25,2 +|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill +| /tmp/pardes-snap/shellset/cwd/cmd.txt Save New Del +| 1 Shell zznosuchshell +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap fallback-shell grid=90x20 cursor=49,4 +|New Newcol Find Grep Help Tutor Dump NextColor Debug Kill +| /tmp/pardes-snap/shellset/cwd/cmd.txt Save /tmp/pardes-snap/shellset/cwd New Del +| 1 Shell zznosuchshell +| cmd.txt zmarkfile.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/shellset.snap b/test/snapshots/shellset.snap new file mode 100644 index 00000000..193d8432 --- /dev/null +++ b/test/snapshots/shellset.snap @@ -0,0 +1,43 @@ +# The Shell builtin names the binary the NEXT terminal execs. What is pinned +# here is the case that has to hold on a machine you did not set up: the name +# resolves to nothing, and the pane opens anyway. +# +# That is not a corner — it is the DEFAULT's failure mode. pardes ships +# `Shell fish` as the default, and a box without fish must still get a working +# shell rather than a pane whose child dies at exec and shows one EOF. So the +# lookup falls back, and this is the proof: a name nothing resolves to, and the +# new pane still greets and lists like any other. +# +# The rest of the feature is unit-tested rather than pinned here, on purpose. +# Which family a binary belongs to, what argv each one gets and where the +# lookup searches are in shell_bin.zig's own tests; the fish end of it cannot +# be a golden at all, because fish's prompt carries a hostname and its greeting +# a version number. (Every script in this suite runs bash, pinned through an +# ordinary config file the harness writes — see snapshot.zig.) +file cmd.txt Shell zznosuchshell +file zmarkfile.txt x +start 20 90 cmd.txt +wait 8000 Shell zznosuchshell +stable 700 20000 +snap boot +# execute the line the way you would run any command: select it, Tab. Nothing +# on any machine is installed under that name, so the resolver runs out of +# directories. (A file pane, so the line executed is the line you can see — +# typing into a terminal's overlay would leave `gg`/`x` selecting its output.) +key g g +key x +stable 400 5000 +key tab +stable 700 15000 +# NOTHING happened on screen, and that is the assertion: a name the builtin +# parser does not know is a command line, so it would have forked a terminal +# for this directory and printed `Shell: command not found` into it (that is +# cmdword.snap's contract). One pane, no error — `Shell` was consumed as a +# builtin and its argument went with it. +snap builtin-ran +# a new terminal, which asks for a shell that is not there. It gets the +# fallback: the pane greets, `ls` runs, and its output is on screen. +key space c n +wait 15000 zmarkfile.txt +stable 700 20000 +snap fallback-shell |
