diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/perf.zig | 2 | ||||
| -rw-r--r-- | test/snapshots/builtins.snap | 2 | ||||
| -rw-r--r-- | test/snapshots/delask.golden | 56 | ||||
| -rw-r--r-- | test/snapshots/delask.snap | 71 | ||||
| -rw-r--r-- | test/snapshots/layout-close.snap | 4 | ||||
| -rw-r--r-- | test/snapshots/leader.snap | 2 | ||||
| -rw-r--r-- | test/snapshots/lspdebug.snap | 3 |
7 files changed, 138 insertions, 2 deletions
diff --git a/test/perf.zig b/test/perf.zig index 5ac38ccf..057725fd 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -1012,7 +1012,7 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const if (core) |p| { pump(p); try pardes.panes.Mini.open(p, 0, path); - for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id); + for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id, null); pump(p); p.settings.colors = true; const file = p.panes[p.active].?.file.?; diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap index 02547b91..9b91a93d 100644 --- a/test/snapshots/builtins.snap +++ b/test/snapshots/builtins.snap @@ -23,6 +23,8 @@ wheel up 110 50 wheel up 110 50 wheel up 110 50 wheel up 110 50 +wheel up 110 50 +wheel up 110 50 wait 10000 Look enter, right-click wait 10000 Exec tab, middle-click wait 10000 Filter diff --git a/test/snapshots/delask.golden b/test/snapshots/delask.golden new file mode 100644 index 00000000..56de45cf --- /dev/null +++ b/test/snapshots/delask.golden @@ -0,0 +1,56 @@ +== snap three grid=100x36 cursor=18,20 +|Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill +| New Tty Find Grep Joincol Delcol +| /tmp/pardes-snap/delask/cwd/top.txt Save Tty Collapse Del +| 1 top-marker +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| /tmp/pardes-snap/delask/cwd/+New * Save Tty Collapse Del +| 1 middle-pane +| +| +| +| +| +| +| +| /tmp/pardes-snap/delask/cwd/+New * Save Tty Collapse Del +| 1 bottom-pane Up +== snap asked grid=100x36 cursor=18,20 +|20: 1 middle-pane Del: give space to k above j below +|29: 1 bottom-pane +== snap kept grid=100x36 cursor=18,20 +|20: 1 middle-pane +== snap below-took grid=100x36 cursor=18,20 +|20: 1 bottom-pane +|28: +|29: +== snap typed grid=100x36 cursor=27,20 +|20: 1 bottom-pane DelBelow +|28: /tmp/pardes-snap/delask/cwd/+New * Save Tty Collapse Del +|29: 1 third-pane +== snap below-took-click grid=100x36 cursor=17,20 +|20: 1 third-pane +|28: +|29: +== snap four grid=100x36 cursor=7,12 +|3: 1 top-marker New +|11: /tmp/pardes-snap/delask/cwd/+New Save Tty Collapse Del +|12: 1 +== snap mouse-del grid=100x36 cursor=9,3 +|3: 1 top-marker +|11: +|12: diff --git a/test/snapshots/delask.snap b/test/snapshots/delask.snap new file mode 100644 index 00000000..04bc850c --- /dev/null +++ b/test/snapshots/delask.snap @@ -0,0 +1,71 @@ +# Del from the keyboard on a pane with open panes above AND below asks, on the +# pane's notice band, which one takes its rows: k above, j below, anything else +# keeps the pane. A click, and DelAbove/DelBelow (Del k / Del j), never ask. +file top.txt top-marker +start 36 100 top.txt +wait 8000 top-marker +stable 700 20000 +# two scratch panes below the file, each saying which it is, then focus the +# middle one +key space f n +stable 400 5000 +key i +text middle-pane +key esc +settle 100 +key space f n +stable 400 5000 +key i +text bottom-pane +key esc +settle 100 +key c-w k +stable 400 5000 +snap three +# asked, and nothing closes yet +key space d +stable 400 5000 +snap asked +# Esc takes the question back: the pane stays +key esc +settle 100 +stable 400 5000 +snap kept +# j: the pane below grows over the middle one's rows, the file keeps its own +key space d +stable 400 5000 +key j +stable 700 10000 +snap below-took +# a pane under it, and DelBelow (Del j) appended to the middle one's text and +# executed with a click: no question, the pane below takes the rows +key space f n +stable 400 5000 +key i +text third-pane +key esc +settle 100 +key c-w k +stable 400 5000 +key A +send \x20DelBelow +key esc +settle 100 +stable 400 5000 +snap typed +press middle @DelBelow 21 +release middle @DelBelow 21 +stable 700 10000 +snap below-took-click +# a fresh pane between the file and the third one, closed by a middle click +# on its tag's Del: no question, and the rows go up as they always have +press left 10 5 +release left 10 5 +stable 400 5000 +key space f n +stable 400 5000 +snap four +press middle @Del 12 +release middle @Del 12 +stable 700 10000 +snap mouse-del diff --git a/test/snapshots/layout-close.snap b/test/snapshots/layout-close.snap index 3d28e1d5..f459ffb4 100644 --- a/test/snapshots/layout-close.snap +++ b/test/snapshots/layout-close.snap @@ -24,11 +24,13 @@ stable 700 15000 snap altc # Del the 2nd pane: source-local column insertion makes this column too narrow # to expose its tag words, so focus its body and invoke the same pane-scoped -# builtin by chord. The pane above absorbs; the other panes keep their rows. +# builtin by chord. With panes above and below, the chord asks which one +# takes the rows: k, the pane above. The other panes keep their rows. press left 5 9 release left 5 9 stable 400 5000 key space d +key k stable 700 10000 snap del # exit the (now) 2nd shell through its real tty: pty EOF, again only the pane diff --git a/test/snapshots/leader.snap b/test/snapshots/leader.snap index f018a88c..78594a47 100644 --- a/test/snapshots/leader.snap +++ b/test/snapshots/leader.snap @@ -32,7 +32,9 @@ key space h t wait 10000 PARDES TUTOR stable 700 15000 snap tutor +# the tutor has panes above and below it, so SPC d asks: k gives its rows up key space d +key k stable 700 15000 snap deleted diff --git a/test/snapshots/lspdebug.snap b/test/snapshots/lspdebug.snap index 23a95db0..ab330a76 100644 --- a/test/snapshots/lspdebug.snap +++ b/test/snapshots/lspdebug.snap @@ -46,7 +46,10 @@ wait 10000 definition z.zig # report one row short of its second query: step the cursor past it. key j j j wait 10000 explain z.zig +# the report sits between the source and the results, so Del asks where its +# rows go: k, back to the source above key space d +key k key space w j key space d stable 700 15000 |
