summaryrefslogtreecommitdiff
path: root/test/snapshots/psearch.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-26 18:36:08 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commite381c96a08f08e03a340a24acb3fe5fe1fca51be (patch)
treedb0ef0cc2652d2797b9e2f73709db601816436d1 /test/snapshots/psearch.snap
parenta4a2a96d023a5977ae7a7d07c7ee9e4fe38e9c60 (diff)
downloadpardes-e381c96a08f08e03a340a24acb3fe5fe1fca51be.tar.gz
pardes-e381c96a08f08e03a340a24acb3fe5fe1fca51be.zip
adding better search to tty mode
Diffstat (limited to 'test/snapshots/psearch.snap')
-rw-r--r--test/snapshots/psearch.snap68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/snapshots/psearch.snap b/test/snapshots/psearch.snap
new file mode 100644
index 00000000..4c5e74d0
--- /dev/null
+++ b/test/snapshots/psearch.snap
@@ -0,0 +1,68 @@
+# `/` search on a TERMINAL pane: the same tag input as a file pane, searching
+# the shell's own scrollback (the plain text view Look reads, prompt rows
+# hidden). Results land in a +Search OUTPUT BUFFER — a file pane with no file
+# behind it, so its tag has no Save — and point at `@p0:LINE`, the look target
+# that names a live pane, since a terminal has no path. n/N walk the buffer
+# and look each row, scrolling the terminal to that line of its scrollback.
+start 30 140
+wait 8000 Kill Newcol
+stable 700 20000
+# print something to search (a bare boot starts in tty mode; the marker is
+# split so the echoed command line, which normal mode hides anyway, can never
+# be the thing that matched)
+text printf 'x MA''RK a\nzz\nx MA''RK b\nzz\nx MA''RK c\n'
+key enter
+wait 10000 MARK c
+stable 700 10000
+key c-b
+stable 600 8000
+snap output
+# / types the pattern into the terminal's tag exactly as on a file pane
+key /
+stable 400 5000
+text MARK
+stable 400 5000
+snap typing
+# Enter opens the results buffer: three @p0:LINE:COL rows, focus stays here
+key enter
+wait 10000 @p0:2:3
+stable 700 15000
+snap results
+# n looks result 1: the terminal's cursor lands on that scrollback line, at
+# the matched COLUMN (3, past the leading "x ") — not the start of the line
+key n
+stable 700 15000
+snap first
+snapstyle first
+key n
+stable 700 15000
+snap second
+# N walks back
+key N
+stable 700 15000
+snap back
+# a no-match search empties the buffer; n then has nowhere to go
+key /
+text zzqq
+key enter
+stable 700 10000
+key n
+stable 400 5000
+snap nomatch
+# right-clicking a word that names no file is the same search (acme button 3),
+# but NOT in tty mode: there the click belongs to the program on the other end,
+# so the buffer stays empty
+key c-b
+stable 600 8000
+press right 75 4
+release right 75 4
+stable 700 10000
+snap ttyinert
+# back in normal mode the same click searches for MARK
+key c-b
+stable 600 8000
+press right 75 4
+release right 75 4
+wait 10000 @p0:2:3
+stable 700 15000
+snap rightsearch