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/shellset.snap | |
| 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/shellset.snap')
| -rw-r--r-- | test/snapshots/shellset.snap | 43 |
1 files changed, 43 insertions, 0 deletions
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 |
