summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/look-center.golden93
-rw-r--r--test/snapshots/look-center.snap28
-rw-r--r--test/snapshots/look-file.golden12
3 files changed, 127 insertions, 6 deletions
diff --git a/test/snapshots/look-center.golden b/test/snapshots/look-center.golden
new file mode 100644
index 00000000..f2fe15a4
--- /dev/null
+++ b/test/snapshots/look-center.golden
@@ -0,0 +1,93 @@
+== snap center-open grid=100x30 cursor=7,6
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| nm /tmp/pardes-snap/look-center/cwd/big.txt Save nm /tmp/pardes-snap/look-center/cwd Del
+| 96 line 96
+| 97 line 97 big.txt
+| 98 line 98
+| 99 line 99
+| 100 line 100
+| 101 line 101
+| 102 line 102
+| 103 line 103
+| 104 line 104
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+| big.txt:100 big.txt:150 big.txt:2
+|
+|
+|
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+|
+|
+|
+== snap center-dedup grid=100x30 cursor=4,17
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| nm /tmp/pardes-snap/look-center/cwd/big.txt Save nm /tmp/pardes-snap/look-center/cwd Del
+| 146 line 146
+| 147 line 147 big.txt
+| 148 line 148
+| 149 line 149
+| 150 line 150
+| 151 line 151
+| 152 line 152
+| 153 line 153
+| 154 line 154
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+| big.txt:100 big.txt:150 big.txt:2
+|
+|
+|
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+|
+|
+|
+== snap center-clamp grid=100x30 cursor=4,17
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| nm /tmp/pardes-snap/look-center/cwd/big.txt Save nm /tmp/pardes-snap/look-center/cwd Del
+| 1 line 1
+| 2 line 2 big.txt
+| 3 line 3
+| 4 line 4
+| 5 line 5
+| 6 line 6
+| 7 line 7
+| 8 line 8
+| 9 line 9
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+| big.txt:100 big.txt:150 big.txt:2
+|
+|
+|
+| nm /tmp/pardes-snap/look-center/cwd Del
+|
+| big.txt
+|
+|
+|
+|
+|
+|
diff --git a/test/snapshots/look-center.snap b/test/snapshots/look-center.snap
new file mode 100644
index 00000000..db575844
--- /dev/null
+++ b/test/snapshots/look-center.snap
@@ -0,0 +1,28 @@
+# a look on path:NN opens the file with the target line CENTERED in the body
+# (scroll = line - body/2): fresh open at a deep line, then dedup re-looks at
+# the same path re-center the existing pane, and a look near line 1 clamps
+# the scroll at 0 (no negative scroll)
+lines big.txt 200
+start 30 100
+wait 8000 big.txt
+stable 700 20000
+press left 5 8
+release left 5 8
+stable 400 5000
+key i
+text big.txt:100 big.txt:150 big.txt:2
+key esc
+settle 700
+stable 400 5000
+press right 7 8
+release right 7 8
+stable 700 15000
+snap center-open
+press right 18 18
+release right 18 18
+stable 700 15000
+snap center-dedup
+press right 30 18
+release right 30 18
+stable 700 15000
+snap center-clamp
diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden
index 4f6d4a71..5e8166c7 100644
--- a/test/snapshots/look-file.golden
+++ b/test/snapshots/look-file.golden
@@ -1,15 +1,15 @@
-== snap file-open grid=100x30 cursor=7,2
+== snap file-open grid=100x30 cursor=7,6
|Kill Newcol Tutor Debug Colors NextColor Dump
| nm /tmp/pardes-snap/look-file/cwd/big.txt Save D nm /tmp/pardes-snap/look-file/cwd Del
+| 36 line 36
+| 37 line 37 big.txt
+| 38 line 38
+| 39 line 39
| 40 line 40
-| 41 line 41 big.txt
+| 41 line 41
| 42 line 42
| 43 line 43
| 44 line 44
-| 45 line 45
-| 46 line 46
-| 47 line 47
-| 48 line 48
| nm /tmp/pardes-snap/look-file/cwd Del
|
| big.txt