blob: 87f6f9ef21e194359348748f010b5f05c5a5765c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# The pane tag has to follow the shell around, because a relative `Look` is
# resolved against it: with a stale cwd, clicking `README.md` after a `cd`
# looks for it in the directory the pane was SPAWNED in and finds nothing.
#
# On linux the host re-reads /proc/<pid>/cwd every frame. macOS asks libproc,
# and asks it only for a pane that just produced output — a `cd` is a command
# and a shell that ran a command prints its next prompt, so nothing else can
# have moved one. This script is what proves that gating is not too clever:
# the tag must be right AFTER the cd and must stay right when nothing happens.
start 24 100
wait 8000 $
stable 700 20000
# The hermetic world puts the shell in <base>/work, so the boot tag names it
# and no absolute path from this machine can leak into the golden.
snap spawned
# `cd` writes nothing but the next prompt: the one and only signal the lazy
# refresh gets. Two of them, because the second has to survive the first
# having already cleared the flag.
text cd /tmp
key enter
wait 8000 $
stable 700 20000
snap moved
text cd /
key enter
wait 8000 $
stable 700 20000
snap moved-again
# ...and an idle pass must not lose it again: the refresh clears its own flag,
# so a tick with no output must leave the tag exactly where it was.
stable 700 20000
snap idle
|