diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-27 10:20:19 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | c79612b523c1526202335302e1e49c078ca317cf (patch) | |
| tree | b76d7b0e15f3b0e43ba65f9ea9eb57ee4a8ed6e1 /test | |
| parent | f0e498832a1a4f92d5fdbc3fc643a3dba1dd9df9 (diff) | |
| download | pardes-c79612b523c1526202335302e1e49c078ca317cf.tar.gz pardes-c79612b523c1526202335302e1e49c078ca317cf.zip | |
look resolves against every open pane's directory: clicked pane first, then most-recently-focused, search only when all fail
Diffstat (limited to 'test')
| -rw-r--r-- | test/snapshots/lookpanes.golden | 306 | ||||
| -rw-r--r-- | test/snapshots/lookpanes.snap | 79 |
2 files changed, 385 insertions, 0 deletions
diff --git a/test/snapshots/lookpanes.golden b/test/snapshots/lookpanes.golden new file mode 100644 index 00000000..e2f72d13 --- /dev/null +++ b/test/snapshots/lookpanes.golden @@ -0,0 +1,306 @@ +== snap shells grid=130x50 cursor=122,3 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Del NOR /tmp/pardes-snap/lookpanes/cwd Del +| 1 both.txt +| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha Del +| +| amark.txt both.txt pick.txt twin.txt zqonly.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap other-dir grid=130x50 cursor=7,27 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Del NOR /tmp/pardes-snap/lookpanes/cwd Del +| 1 both.txt +| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha Del +| +| amark.txt both.txt pick.txt twin.txt zqonly.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Del +| 1 ONLY-IN-ALPHA +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap clicked-wins grid=130x50 cursor=7,15 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Del NOR /tmp/pardes-snap/lookpanes/cwd Del +| 1 both.txt +| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha Del +| +| amark.txt both.txt pick.txt twin.txt zqonly.txt +| +| +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Del +| 1 BOTH-FROM-BETA +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Del +| 1 ONLY-IN-ALPHA +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap mru-alpha grid=130x50 cursor=7,9 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Del NOR /tmp/pardes-snap/lookpanes/cwd Del +| 1 both.txt +| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha Del +| +| amark.txt both.txt pick.txt twin.txt zqonly.txt +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Del +| 1 PICK-FROM-ALPHA +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Del +| 1 BOTH-FROM-BETA +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Del +| 1 ONLY-IN-ALPHA +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap mru-beta grid=130x50 cursor=7,5 +|Kill Newcol Tutor Debug NextColor Dump +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/bmark.txt Save Del NOR /tmp/pardes-snap/lookpanes/cwd Del +| 1 both.txt +| 2 b-marker alpha beta zzboot.txt zqonly.txt pick.txt twin.txt +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/twin.txt Save Del +| 1 TWIN-FROM-BETA NOR /tmp/pardes-snap/lookpanes/cwd/alpha Del +| +| amark.txt both.txt pick.txt twin.txt zqonly.txt +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/pick.txt Save Del +| 1 PICK-FROM-ALPHA +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/beta/both.txt Save Del +| 1 BOTH-FROM-BETA +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/lookpanes/cwd/alpha/zqonly.txt Save Del +| 1 ONLY-IN-ALPHA +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== style mru-beta +|0: 0-37 #949494,#121212, 38-129 d,#121212, +|1: 0-1 d,#262626, 2-59 #949494,#121212, 60-64 d,#121212, 65-66 d,#262626, 67-104 #949494,#121212, 105-129 d,#121212, +|2: 0-1 d,#444444, 2-6 #626262,#080808, 7-14 #bdbdbd,#080808, 15-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|3: 0-1 d,#444444, 2-6 #626262,#080808, 7-14 #bdbdbd,#080808, 15-64 d,#080808, 65-66 d,#444444, 67-121 #bdbdbd,#080808, 122-129 d,#080808, +|4: 0-1 d,#626262, 2-58 #949494,#121212, 59-64 d,#121212, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|5: 0-1 d,#444444, 2-6 #949494,#121212, 7-20 #bdbdbd,#080808, 21-64 d,#080808, 65-66 d,#262626, 67-110 #949494,#121212, 111-129 d,#121212, +|6: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|7: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|8: 0-1 d,#262626, 2-59 #949494,#121212, 60-64 d,#121212, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|9: 0-1 d,#444444, 2-6 #626262,#080808, 7-21 #bdbdbd,#080808, 22-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|10: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|11: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|12: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|13: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|14: 0-1 d,#262626, 2-58 #949494,#121212, 59-64 d,#121212, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|15: 0-1 d,#444444, 2-6 #626262,#080808, 7-20 #bdbdbd,#080808, 21-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|16: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|17: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|18: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|19: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|20: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|21: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|22: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|23: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|24: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|25: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|26: 0-1 d,#262626, 2-61 #949494,#121212, 62-64 d,#121212, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|27: 0-1 d,#444444, 2-6 #626262,#080808, 7-19 #bdbdbd,#080808, 20-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|28: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|29: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|30: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|31: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|32: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|33: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|34: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|35: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|36: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|37: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|38: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|39: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|40: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|41: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|42: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|43: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|44: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|45: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|46: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|47: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|48: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, +|49: 0-1 d,#444444, 2-6 #626262,#080808, 7-64 d,#080808, 65-66 d,#444444, 67-129 #bdbdbd,#080808, diff --git a/test/snapshots/lookpanes.snap b/test/snapshots/lookpanes.snap new file mode 100644 index 00000000..98648226 --- /dev/null +++ b/test/snapshots/lookpanes.snap @@ -0,0 +1,79 @@ +# a look resolves against EVERY open pane's directory, in access order: the +# pane the click came from first, then the rest most-recently-focused first, +# and only a word NO directory holds falls through to a search. Two dirs +# (alpha, beta) hold same-named files and the shell's own cwd holds none of +# them, so every look below would have been a search before. +dirmk alpha +dirmk beta +file zzboot.txt x +file alpha/amark.txt a +file alpha/zqonly.txt ONLY-IN-ALPHA +file alpha/pick.txt PICK-FROM-ALPHA +file alpha/twin.txt TWIN-FROM-ALPHA +file alpha/both.txt BOTH-FROM-ALPHA +file beta/pick.txt PICK-FROM-BETA +file beta/twin.txt TWIN-FROM-BETA +file beta/both.txt BOTH-FROM-BETA +# the file argument opens a pane whose directory is beta's, beside a shell in +# the workdir; its first line is a word to look FROM that pane +file beta/bmark.txt both.txt\nb-marker +start 50 130 -n 2 beta/bmark.txt +wait 8000 zzboot.txt +stable 700 20000 +# an ordinary dir look on the shell's own ls output: a shell in ./alpha, +# split below it +press right 70 4 +release right 70 4 +wait 10000 amark.txt +stable 700 20000 +# type the words to look into what is left of the workdir shell (past its own +# ls output, on the same row: its last row is the resize handle) +press left 95 4 +release left 95 4 +stable 400 5000 +key i +text zqonly.txt pick.txt twin.txt +key esc +settle 700 +stable 400 5000 +snap shells +# make the beta pane the most recently focused, so the walk has to pass it +press left 10 3 +release left 10 3 +stable 700 10000 +# zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails, +# the alpha shell answers. Before, this word became a search. +press right 99 4 +release right 99 4 +wait 10000 ONLY-IN-ALPHA +stable 700 20000 +snap other-dir +# both.txt is in BOTH dirs and alpha is now the most recent (its file pane +# just opened), but the CLICK still wins: looked inside the beta pane it +# opens beta's copy +press right 10 3 +release right 10 3 +wait 10000 BOTH-FROM-BETA +stable 700 20000 +snap clicked-wins +# from a pane whose own dir holds neither copy the access order decides: +# focus the alpha shell, look pick.txt (in both dirs) -> alpha's +press left 70 12 +release left 70 12 +stable 700 10000 +press right 109 4 +release right 109 4 +wait 10000 PICK-FROM-ALPHA +stable 700 20000 +snap mru-alpha +# focus the beta pane instead and the same look flips: twin.txt is in both +# dirs, beta is most recent, beta's copy opens +press left 10 3 +release left 10 3 +stable 700 10000 +press right 118 4 +release right 118 4 +wait 10000 TWIN-FROM-BETA +stable 700 20000 +snap mru-beta +snapstyle mru-beta |
