diff options
Diffstat (limited to 'test/snapshots')
40 files changed, 3116 insertions, 0 deletions
diff --git a/test/snapshots/boot.golden b/test/snapshots/boot.golden new file mode 100644 index 00000000..85bac8dd --- /dev/null +++ b/test/snapshots/boot.golden @@ -0,0 +1,62 @@ +== snap boot grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/boot/cwd Del nm /tmp/pardes-snap/boot/cwd Del +| +| hello.txt hello.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/boot/cwd Del +| +| hello.txt +| +| +| +| +| +| +| +| +| +| +| +== style boot +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#383c54, 52-83 #969696,#2c2a3e, 84-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/boot.snap b/test/snapshots/boot.snap new file mode 100644 index 00000000..33b12be0 --- /dev/null +++ b/test/snapshots/boot.snap @@ -0,0 +1,8 @@ +# default startup: 2 columns, 3 shells, each greets with ls; prompts hidden +file hello.txt marker-content +start 30 100 +wait 8000 Kill Newcol +wait 8000 hello.txt +stable 700 20000 +snap boot +snapstyle boot diff --git a/test/snapshots/dump.actual b/test/snapshots/dump.actual new file mode 100644 index 00000000..cf39f324 --- /dev/null +++ b/test/snapshots/dump.actual @@ -0,0 +1,63 @@ +== file dump (3004 bytes) +.{ + .magic = "pardes-dump", + .version = 1, + .screen = .{ .cols = 100, .rows = 30 }, + .active = 0, + .topbar = "Kill Newcol Tutor Debug Colors NextColor Dump", + .theme = "dark", + .columns = .{ .{ .weight = 1, .panes = .{ 0, 1 } }, .{ .weight = 1, .panes = .{2} } }, + .panes = .{ + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n typed-marker\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 14, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = "G10xMzM7QwcbXTEzMztEBxtdMTMzO0MHG10wO2dvYmxpbkBwYXJkZXM6L3RtcC9wYXJkZXMtc25hcC9kdW1wL2N3ZAcbWz8yMDA0aBtdMTMzO0E7Y2w9bGluZQckIBtdMTMzO0IHDRtbSw0bXTEzMztBO2NsPWxpbmUHJCAbXTEzMztCB2xzDQobWz8yMDA0bA0bXTEzMztDB2QudHh0DQobXTEzMztDBxtdMTMzO0QHG10xMzM7QwcbXTA7Z29ibGluQHBhcmRlczovdG1wL3BhcmRlcy1zbmFwL2R1bXAvY3dkBxtbPzIwMDRoG10xMzM7QTtjbD1saW5lByQgG10xMzM7Qgc=", + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 13, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = "G10xMzM7QwcbXTEzMztEBxtdMTMzO0MHG10wO2dvYmxpbkBwYXJkZXM6L3RtcC9wYXJkZXMtc25hcC9kdW1wL2N3ZAcbWz8yMDA0aBtdMTMzO0E7Y2w9bGluZQckIBtdMTMzO0IHDRtbSw0bXTEzMztBO2NsPWxpbmUHJCAbXTEzMztCB2xzDQobWz8yMDA0bA0bXTEzMztDB2QudHh0DQobXTEzMztDBxtdMTMzO0QHG10xMzM7QwcbXTA7Z29ibGluQHBhcmRlczovdG1wL3BhcmRlcy1zbmFwL2R1bXAvY3dkBxtbPzIwMDRoG10xMzM7QTtjbD1saW5lByQgG10xMzM7Qgc=", + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 28, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = "G10xMzM7QwcbXTEzMztEBxtdMTMzO0MHG10wO2dvYmxpbkBwYXJkZXM6L3RtcC9wYXJkZXMtc25hcC9kdW1wL2N3ZAcbWz8yMDA0aBtdMTMzO0E7Y2w9bGluZQckIBtdMTMzO0IHDRtbSw0bXTEzMztBO2NsPWxpbmUHJCAbXTEzMztCB2xzDQobWz8yMDA0bA0bXTEzMztDB2QudHh0DQobXTEzMztDBxtdMTMzO0QHG10xMzM7QwcbXTA7Z29ibGluQHBhcmRlczovdG1wL3BhcmRlcy1zbmFwL2R1bXAvY3dkBxtbPzIwMDRoG10xMzM7QTtjbD1saW5lByQgG10xMzM7Qgc=", + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + }, +}== end file diff --git a/test/snapshots/dump.golden b/test/snapshots/dump.golden new file mode 100644 index 00000000..c18003d5 --- /dev/null +++ b/test/snapshots/dump.golden @@ -0,0 +1,64 @@ +== file dump +.{ + .magic = "pardes-dump", + .version = 1, + .screen = .{ .cols = 100, .rows = 30 }, + .active = 0, + .topbar = "Kill Newcol Tutor Debug Colors NextColor Dump", + .theme = "dark", + .columns = .{ .{ .weight = 1, .panes = .{ 0, 1 } }, .{ .weight = 1, .panes = .{2} } }, + .panes = .{ + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n typed-marker\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 14, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = <elided> + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 13, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = <elided> + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + .{ + .kind = .terminal, + .tag = "nm /tmp/pardes-snap/dump/cwd Del", + .body = "\nd.txt\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", + .scroll = 0, + .cols = 48, + .rows = 28, + .vweight = 1, + .terminal = .{ + .cwd = "/tmp/pardes-snap/dump/cwd", + .stream = "\nd.txt\n", + .stream_b64 = <elided> + .cursor = .{ .col = 2, .row = 2 }, + }, + .file = null, + .image = null, + }, + }, +} +== end file diff --git a/test/snapshots/dump.snap b/test/snapshots/dump.snap new file mode 100644 index 00000000..85664c2f --- /dev/null +++ b/test/snapshots/dump.snap @@ -0,0 +1,18 @@ +# the Dump builtin serializes the session to /tmp/pardes-dump.zon; the ZON must +# be byte-identical between old and new (golden generated from the OLD binary) +file d.txt x +start 30 100 +wait 8000 d.txt +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text typed-marker +key esc +settle 700 +stable 400 5000 +press middle 43 1 +release middle 43 1 +settle 800 +snapfile dump /tmp/pardes-dump.zon diff --git a/test/snapshots/edit.actual b/test/snapshots/edit.actual new file mode 100644 index 00000000..e45687a2 --- /dev/null +++ b/test/snapshots/edit.actual @@ -0,0 +1,62 @@ +== snap inserted grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/edit/cwd Del nm /tmp/pardes-snap/edit/cwd Del +| +| e.txt e.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/edit/cwd Del +| +| e.txt +| +| +| +| +| +| +| +| +| +| +| +== style inserted +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#383c54, 52-83 #969696,#2c2a3e, 84-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/edit.golden b/test/snapshots/edit.golden new file mode 100644 index 00000000..846bfa30 --- /dev/null +++ b/test/snapshots/edit.golden @@ -0,0 +1,62 @@ +== snap inserted grid=100x30 cursor=4,9 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/edit/cwd Del nm /tmp/pardes-snap/edit/cwd Del +| +| e.txt e.txt +| +| +| +| +| +| hello-insert +| +| +| +| +| +| +| nm /tmp/pardes-snap/edit/cwd Del +| +| e.txt +| +| +| +| +| +| +| +| +| +| +| +== style inserted +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#383c54, 52-83 #969696,#2c2a3e, 84-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/edit.snap b/test/snapshots/edit.snap new file mode 100644 index 00000000..660add70 --- /dev/null +++ b/test/snapshots/edit.snap @@ -0,0 +1,15 @@ +# insert-mode splice: click into a body row, type, escape back to normal +file e.txt x +start 30 100 +wait 8000 e.txt +stable 700 20000 +press left 5 10 +release left 5 10 +settle 400 +key i +text hello-insert +key esc +settle 700 +stable 500 8000 +snap inserted +snapstyle inserted diff --git a/test/snapshots/exec.golden b/test/snapshots/exec.golden new file mode 100644 index 00000000..23b1305b --- /dev/null +++ b/test/snapshots/exec.golden @@ -0,0 +1,124 @@ +== snap exec grid=100x30 cursor=4,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/exec/cwd Del nm /tmp/pardes-snap/exec/cwd Del +| +| e.txt e.txt +| +| +| +| echo MID''OK +| MIDOK +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/exec/cwd Del +| +| e.txt +| +| +| +| +| +| +| +| +| +| +| +== snap kept grid=100x30 cursor=6,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/exec/cwd Del nm /tmp/pardes-snap/exec/cwd Del +| ZZARG +| ./c.sh e.txt +| +| +| +| echo MID''OK +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/exec/cwd Del +| +| e.txt +| +| +| +| +| +| +| +| +| +| +| +== snap chord grid=100x30 cursor=6,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/exec/cwd Del nm /tmp/pardes-snap/exec/cwd Del +| ZZARG +| ./c.sh e.txt +| +| +| +| echo MID''OK +| CHORDARG:ZZARG +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/exec/cwd Del +| +| e.txt +| +| +| +| +| +| +| +| +| +| +| +== snap deleted grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/exec/cwd Del nm /tmp/pardes-snap/exec/cwd Del +| +| e.txt e.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/exec.snap b/test/snapshots/exec.snap new file mode 100644 index 00000000..dd8c24ee --- /dev/null +++ b/test/snapshots/exec.snap @@ -0,0 +1,46 @@ +# middle-drag executes the selection in the pane's shell; a left press during +# the middle drag captures the kept left selection as a trailing argument; +# middle-click Del on the pane tag closes the pane +file e.txt x +start 30 100 +wait 8000 e.txt +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text echo MID''OK +key esc +settle 700 +stable 400 5000 +press middle 5 8 +drag middle 16 8 +release middle 16 8 +wait 10000 MIDOK +stable 700 10000 +snap exec +# chord (canonical sequence, as in the prototype e2e): print an arg word and a +# script path, left-drag-keep the arg, then middle-press on the path + left +# press (captures) + middle release (runs with the arg appended) +key c-b +stable 600 8000 +text printf '#!/bin/sh\necho CHORDARG:"$1"\n' > c.sh; chmod +x c.sh; clear; printf 'ZZARG\n./c.sh\n' +key enter +wait 10000 ./c.sh +stable 700 10000 +key c-b +stable 600 8000 +press left 3 3 +drag left 7 3 +release left 7 3 +stable 400 5000 +snap kept +send \x1b[<1;4;4M\x1b[<0;4;4M\x1b[<1;4;4m +wait 10000 CHORDARG:ZZARG +stable 700 10000 +snap chord +# middle-click Del in this pane's tag (after cwd prefix) closes it +press middle 32 2 +release middle 32 2 +stable 700 10000 +snap deleted diff --git a/test/snapshots/fileedit.golden b/test/snapshots/fileedit.golden new file mode 100644 index 00000000..c6fb40aa --- /dev/null +++ b/test/snapshots/fileedit.golden @@ -0,0 +1,116 @@ +== snap edited grid=100x30 cursor=17,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/fileedit/cwd/f.txt Save Del nm /tmp/pardes-snap/fileedit/cwd Del +| 1 liEDIT''MEne 1 +| 2 line 2 f.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/fileedit/cwd Del +| +| f.txt +| +| +| +| f.txt +| +| +| +| nm /tmp/pardes-snap/fileedit/cwd Del +| +| f.txt +| +| +| +| +| +| +== snap deleted grid=100x30 cursor=7,3 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/fileedit/cwd/f.txt Save Del nm /tmp/pardes-snap/fileedit/cwd Del +| 1 liEDIT''MEne 1 +| 2 line 3 f.txt +| 3 line 4 +| 4 line 5 +| 5 line 6 +| 6 line 7 +| 7 line 8 +| 8 line 9 +| 9 line 10 +| nm /tmp/pardes-snap/fileedit/cwd Del +| +| f.txt +| +| +| +| f.txt +| +| +| +| nm /tmp/pardes-snap/fileedit/cwd Del +| +| f.txt +| +| +| +| +| +| +== snap undone grid=100x30 cursor=7,3 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/fileedit/cwd/f.txt Save Del nm /tmp/pardes-snap/fileedit/cwd Del +| 1 liEDIT''MEne 1 +| 2 line 2 f.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/fileedit/cwd Del +| +| f.txt +| +| +| +| f.txt +| +| +| +| nm /tmp/pardes-snap/fileedit/cwd Del +| +| f.txt +| +| +| +| +| +| +== file saved +liEDIT''MEne 1 +line 2 +line 3 +line 4 +line 5 +line 6 +line 7 +line 8 +line 9 +line 10 +line 11 +line 12 +line 13 +line 14 +line 15 +line 16 +line 17 +line 18 +line 19 +line 20 + +== end file diff --git a/test/snapshots/fileedit.snap b/test/snapshots/fileedit.snap new file mode 100644 index 00000000..7bafa358 --- /dev/null +++ b/test/snapshots/fileedit.snap @@ -0,0 +1,40 @@ +# file panes: modal editing on real content, undo, Save writes to disk +lines f.txt 20 +start 30 100 +wait 8000 f.txt +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text f.txt +key esc +settle 700 +press right 6 8 +release right 6 8 +wait 10000 line 3 +stable 700 15000 +# edit line 1: click it, insert, esc +press left 10 3 +release left 10 3 +stable 400 5000 +key i +text EDIT''ME +key esc +settle 700 +stable 400 5000 +snap edited +# x-select line 2 and delete it +key j g h +stable 400 5000 +key x d +stable 400 5000 +snap deleted +key u +stable 400 5000 +snap undone +# Save via the tag: middle-click the Save word (after "nm <path> ") +press middle 42 2 +release middle 42 2 +settle 800 +snapfile saved /tmp/pardes-snap/fileedit/cwd/f.txt diff --git a/test/snapshots/images.golden b/test/snapshots/images.golden new file mode 100644 index 00000000..b6e75fbf --- /dev/null +++ b/test/snapshots/images.golden @@ -0,0 +1,124 @@ +== snap img-open grid=100x30 cursor=4,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| img /tmp/pardes-snap/images/cwd/pic.ppm Petscii nm /tmp/pardes-snap/images/cwd Del +| ๐ฌ๐ฌน +| ๐ฌโโ pic.ppm +| ๐ฌโโ +| ๐ฌโโ +| ๐ฌโโ +| โ๐ฌโ +| โ๐ฌโ +| โ๐ฌโ +| ๐ฌ๐ฌนโ +| nm /tmp/pardes-snap/images/cwd Del +| +| pic.ppm +| +| +| +| pic.ppm +| +| +| +| nm /tmp/pardes-snap/images/cwd Del +| +| pic.ppm +| +| +| +| +| +| +== style img-open +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#2a2a2a, 2-16 d,d, 17-32 #ffffff,#ffffff, 33-33 #ffffff,#352879, 34-34 #352879,#ffffff, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#2a2a2a, 2-16 d,d, 17-30 #ffffff,#ffffff, 31-32 #ffffff,#352879, 33-33 #352879,#ffffff, 34-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#2a2a2a, 2-16 d,d, 17-28 #ffffff,#ffffff, 29-30 #ffffff,#352879, 31-31 #352879,#ffffff, 32-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-16 d,d, 17-26 #ffffff,#ffffff, 27-28 #ffffff,#352879, 29-29 #352879,#ffffff, 30-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-16 d,d, 17-24 #ffffff,#ffffff, 25-26 #ffffff,#352879, 27-27 #352879,#ffffff, 28-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-16 d,d, 17-22 #ffffff,#ffffff, 23-24 #ffffff,#352879, 25-25 #352879,#ffffff, 26-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-16 d,d, 17-20 #ffffff,#ffffff, 21-22 #ffffff,#352879, 23-23 #352879,#ffffff, 24-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-16 d,d, 17-18 #ffffff,#ffffff, 19-20 #ffffff,#352879, 21-21 #352879,#ffffff, 22-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-16 d,d, 17-17 #ffffff,#352879, 18-19 #352879,#ffffff, 20-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style term-palette +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#2a2a2a, 2-16 d,d, 17-32 #ffffff,#ffffff, 33-33 #ffffff,#352879, 34-34 #352879,#ffffff, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#2a2a2a, 2-16 d,d, 17-30 #ffffff,#ffffff, 31-32 #ffffff,#352879, 33-33 #352879,#ffffff, 34-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#2a2a2a, 2-16 d,d, 17-28 #ffffff,#ffffff, 29-30 #ffffff,#352879, 31-31 #352879,#ffffff, 32-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-16 d,d, 17-26 #ffffff,#ffffff, 27-28 #ffffff,#352879, 29-29 #352879,#ffffff, 30-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-16 d,d, 17-24 #ffffff,#ffffff, 25-26 #ffffff,#352879, 27-27 #352879,#ffffff, 28-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-16 d,d, 17-22 #ffffff,#ffffff, 23-24 #ffffff,#352879, 25-25 #352879,#ffffff, 26-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-16 d,d, 17-20 #ffffff,#ffffff, 21-22 #ffffff,#352879, 23-23 #352879,#ffffff, 24-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-16 d,d, 17-18 #ffffff,#ffffff, 19-20 #ffffff,#352879, 21-21 #352879,#ffffff, 22-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-16 d,d, 17-17 #ffffff,#352879, 18-19 #352879,#ffffff, 20-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style no-ascii +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#2a2a2a, 2-16 d,d, 17-32 #ffffff,#ffffff, 33-33 #ffffff,#352879, 34-34 #352879,#ffffff, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#2a2a2a, 2-16 d,d, 17-30 #ffffff,#ffffff, 31-32 #ffffff,#352879, 33-33 #352879,#ffffff, 34-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#2a2a2a, 2-16 d,d, 17-28 #ffffff,#ffffff, 29-30 #ffffff,#352879, 31-31 #352879,#ffffff, 32-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-16 d,d, 17-26 #ffffff,#ffffff, 27-28 #ffffff,#352879, 29-29 #352879,#ffffff, 30-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-16 d,d, 17-24 #ffffff,#ffffff, 25-26 #ffffff,#352879, 27-27 #352879,#ffffff, 28-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-16 d,d, 17-22 #ffffff,#ffffff, 23-24 #ffffff,#352879, 25-25 #352879,#ffffff, 26-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-16 d,d, 17-20 #ffffff,#ffffff, 21-22 #ffffff,#352879, 23-23 #352879,#ffffff, 24-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-16 d,d, 17-18 #ffffff,#ffffff, 19-20 #ffffff,#352879, 21-21 #352879,#ffffff, 22-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-16 d,d, 17-17 #ffffff,#352879, 18-19 #352879,#ffffff, 20-34 #352879,#352879, 35-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/images.snap b/test/snapshots/images.snap new file mode 100644 index 00000000..1b9bf715 --- /dev/null +++ b/test/snapshots/images.snap @@ -0,0 +1,29 @@ +# image panes: right-click a .ppm opens petscii glyph art (no kitty in the +# harness); the live tag toggles palette (C64<->Term) and Ascii glyphs +ppmdiag pic.ppm +start 30 100 +wait 8000 pic.ppm +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text pic.ppm +key esc +settle 700 +press right 6 8 +release right 6 8 +wait 10000 img +stable 700 20000 +snap img-open +snapstyle img-open +# toggle palette to terminal colors: middle-click the C64 word in the tag +press middle 57 2 +release middle 57 2 +stable 700 15000 +snapstyle term-palette +# toggle Ascii off +press middle 62 2 +release middle 62 2 +stable 700 15000 +snapstyle no-ascii diff --git a/test/snapshots/load.golden b/test/snapshots/load.golden new file mode 100644 index 00000000..ade03fe3 --- /dev/null +++ b/test/snapshots/load.golden @@ -0,0 +1,62 @@ +== snap loaded grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/load/cwd Del nm /tmp/pardes-snap/load/cwd Del +| +| LOADMARK d.txt +| 1 +| 2 +| 3 +| 4 +| 5 +| 6 +| 7 +| 8 +| 9 +| 10 +| 11 +| 12 +| nm /tmp/pardes-snap/load/cwd Del +| +| d.txt +| +| +| +| +| +| +| +| +| +| +| +== style loaded +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#383c54, 52-83 #969696,#2c2a3e, 84-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-33 #969696,#2c2a3e, 34-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/load.snap b/test/snapshots/load.snap new file mode 100644 index 00000000..0a9c9e55 --- /dev/null +++ b/test/snapshots/load.snap @@ -0,0 +1,27 @@ +# pardes -l restores another instance's dump (NEW behavior โ the old app had a +# separate replay viewer; this golden is generated from the NEW binary as its +# own regression baseline). Shell output survives the replay; typed insert runs +# are an overlay and do not (same semantics as the old replay viewer). +file d.txt x +start 30 100 +wait 8000 d.txt +stable 700 20000 +key c-b +stable 600 8000 +text echo LOAD''MARK; seq 1 40 +key enter +wait 8000 LOADMARK +stable 700 10000 +key c-b +stable 600 8000 +wheel up 10 8 +wheel up 10 8 +stable 500 8000 +press middle 43 1 +release middle 43 1 +settle 800 +start 30 100 -l /tmp/pardes-dump.zon +wait 8000 LOADMARK +stable 700 20000 +snap loaded +snapstyle loaded diff --git a/test/snapshots/look-dir.actual b/test/snapshots/look-dir.actual new file mode 100644 index 00000000..523560ba --- /dev/null +++ b/test/snapshots/look-dir.actual @@ -0,0 +1,31 @@ +== snap dir-open grid=100x30 cursor=4,9 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/look-dir/cwd Del nm /tmp/pardes-snap/look-dir/cwd Del +| +| sub top.txt sub top.txt +| +| nm /tmp/pardes-snap/look-dir/cwd/sub Del +| ls +| +| inner.txt +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/look-dir/cwd Del +| +| sub top.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/look-dir.golden b/test/snapshots/look-dir.golden new file mode 100644 index 00000000..c4337878 --- /dev/null +++ b/test/snapshots/look-dir.golden @@ -0,0 +1,31 @@ +== snap dir-open grid=100x30 cursor=4,8 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/look-dir/cwd Del nm /tmp/pardes-snap/look-dir/cwd Del +| +| sub top.txt sub top.txt +| +| nm /tmp/pardes-snap/look-dir/cwd/sub Del +| +| inner.txt +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/look-dir/cwd Del +| +| sub top.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/look-dir.snap b/test/snapshots/look-dir.snap new file mode 100644 index 00000000..04b43f6e --- /dev/null +++ b/test/snapshots/look-dir.snap @@ -0,0 +1,20 @@ +# right-click look on a typed dir name opens a shell there (split below) + ls +dirmk sub +file sub/inner.txt inner-marker +file top.txt x +start 30 100 +wait 8000 top.txt +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text sub +key esc +settle 700 +stable 400 5000 +press right 6 8 +release right 6 8 +wait 10000 inner.txt +stable 700 20000 +snap dir-open diff --git a/test/snapshots/look-file.golden b/test/snapshots/look-file.golden new file mode 100644 index 00000000..4f6d4a71 --- /dev/null +++ b/test/snapshots/look-file.golden @@ -0,0 +1,62 @@ +== snap file-open grid=100x30 cursor=7,2 +|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 +| 40 line 40 +| 41 line 41 big.txt +| 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 +| +| +| +| big.txt:40 +| +| +| +| nm /tmp/pardes-snap/look-file/cwd Del +| +| big.txt +| +| +| +| +| +| +== style file-open +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-88 #969696,#2c2a3e, 89-99 d,#2c2a3e, +|2: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-38 #969696,#2c2a3e, 39-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-38 #969696,#2c2a3e, 39-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/look-file.snap b/test/snapshots/look-file.snap new file mode 100644 index 00000000..83010317 --- /dev/null +++ b/test/snapshots/look-file.snap @@ -0,0 +1,19 @@ +# right-click look on a typed path:NN opens a file pane scrolled to the line; +# Enter chord on the same path focuses the existing pane (dedup) +lines big.txt 60 +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:40 +key esc +settle 700 +stable 400 5000 +press right 7 8 +release right 7 8 +stable 700 15000 +snap file-open +snapstyle file-open diff --git a/test/snapshots/modal.golden b/test/snapshots/modal.golden new file mode 100644 index 00000000..b4922f12 --- /dev/null +++ b/test/snapshots/modal.golden @@ -0,0 +1,372 @@ +== snap top grid=100x30 cursor=2,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap moved grid=100x30 cursor=2,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap xsel grid=100x30 cursor=2,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== style xsel +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#383c54, 52-84 #969696,#2c2a3e, 85-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 #d8c8a8,#4a3a1e, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== snap xsel2 grid=100x30 cursor=2,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap yanked grid=100x30 cursor=2,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap vsel grid=100x30 cursor=3,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== style vsel +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#383c54, 52-84 #969696,#2c2a3e, 85-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 #d8c8a8,#4a3a1e, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-3 #d8c8a8,#4a3a1e, 4-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== snap typed grid=100x30 cursor=3,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| fTYPEDour five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap undone grid=100x30 cursor=3,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| four five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap redone grid=100x30 cursor=3,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| fTYPEDour five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| +== snap bottom grid=100x30 cursor=2,9 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/modal/cwd Del nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt words.txt +| +| +| one two three +| fTYPEDour five six +| seven eight nine +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/modal/cwd Del +| +| words.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/modal.snap b/test/snapshots/modal.snap new file mode 100644 index 00000000..adbfd533 --- /dev/null +++ b/test/snapshots/modal.snap @@ -0,0 +1,53 @@ +# helix-modal normal mode: motions, x/v selections, y/d, insert, undo/redo +file words.txt alpha beta +start 30 100 +wait 8000 words.txt +stable 700 20000 +key c-b +stable 600 8000 +text printf 'one two three\nfour five six\nseven eight nine\n' +key enter +wait 8000 seven +stable 700 10000 +key c-b +stable 600 8000 +press left 5 6 +release left 5 6 +stable 400 5000 +key g g +stable 400 5000 +snap top +key j j w +stable 400 5000 +snap moved +key x +stable 400 5000 +snap xsel +snapstyle xsel +key x +stable 400 5000 +snap xsel2 +key y +stable 400 5000 +snap yanked +key v j l +stable 400 5000 +snap vsel +snapstyle vsel +key esc +settle 700 +key i +text TYPED +key esc +settle 700 +stable 400 5000 +snap typed +key u +stable 400 5000 +snap undone +key U +stable 400 5000 +snap redone +key G +stable 400 5000 +snap bottom diff --git a/test/snapshots/scroll.golden b/test/snapshots/scroll.golden new file mode 100644 index 00000000..899c7dec --- /dev/null +++ b/test/snapshots/scroll.golden @@ -0,0 +1,186 @@ +== snap bottom grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/scroll/cwd Del nm /tmp/pardes-snap/scroll/cwd Del +| 188 +| 189 s.txt +| 190 +| 191 +| 192 +| 193 +| 194 +| 195 +| 196 +| 197 +| 198 +| 199 +| 200 +| +| nm /tmp/pardes-snap/scroll/cwd Del +| +| s.txt +| +| +| +| +| +| +| +| +| +| +| +== snap wheel3 grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/scroll/cwd Del nm /tmp/pardes-snap/scroll/cwd Del +| 185 +| 186 s.txt +| 187 +| 188 +| 189 +| 190 +| 191 +| 192 +| 193 +| 194 +| 195 +| 196 +| 197 +| 198 +| nm /tmp/pardes-snap/scroll/cwd Del +| +| s.txt +| +| +| +| +| +| +| +| +| +| +| +== snap gutter-up grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/scroll/cwd Del nm /tmp/pardes-snap/scroll/cwd Del +| 178 +| 179 s.txt +| 180 +| 181 +| 182 +| 183 +| 184 +| 185 +| 186 +| 187 +| 188 +| 189 +| 190 +| 191 +| nm /tmp/pardes-snap/scroll/cwd Del +| +| s.txt +| +| +| +| +| +| +| +| +| +| +| +== snap gutter-down grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/scroll/cwd Del nm /tmp/pardes-snap/scroll/cwd Del +| 180 +| 181 s.txt +| 182 +| 183 +| 184 +| 185 +| 186 +| 187 +| 188 +| 189 +| 190 +| 191 +| 192 +| 193 +| nm /tmp/pardes-snap/scroll/cwd Del +| +| s.txt +| +| +| +| +| +| +| +| +| +| +| +== snap wheel-down grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/scroll/cwd Del nm /tmp/pardes-snap/scroll/cwd Del +| 181 +| 182 s.txt +| 183 +| 184 +| 185 +| 186 +| 187 +| 188 +| 189 +| 190 +| 191 +| 192 +| 193 +| 194 +| nm /tmp/pardes-snap/scroll/cwd Del +| +| s.txt +| +| +| +| +| +| +| +| +| +| +| +== style wheel-down +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#2a2a2a, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/scroll.snap b/test/snapshots/scroll.snap new file mode 100644 index 00000000..8e55224d --- /dev/null +++ b/test/snapshots/scroll.snap @@ -0,0 +1,31 @@ +# scrolling: wheel + scrollbar gutter clicks over real scrollback +file s.txt x +start 30 100 +wait 8000 s.txt +stable 700 20000 +key c-b +stable 600 8000 +text seq 1 200 +key enter +wait 8000 199 +stable 700 15000 +key c-b +stable 600 8000 +snap bottom +wheel up 10 8 +wheel up 10 8 +wheel up 10 8 +stable 500 8000 +snap wheel3 +press left 1 10 +release left 1 10 +stable 500 8000 +snap gutter-up +press right 1 5 +release right 1 5 +stable 500 8000 +snap gutter-down +wheel down 10 8 +stable 500 8000 +snap wheel-down +snapstyle wheel-down diff --git a/test/snapshots/syntax.actual b/test/snapshots/syntax.actual new file mode 100644 index 00000000..d8c537b7 --- /dev/null +++ b/test/snapshots/syntax.actual @@ -0,0 +1,124 @@ +== snap zig-open grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/syntax/cwd/demo.zig Save Del nm /tmp/pardes-snap/syntax/cwd Del +| 1 const std = @import("std"); // greet +| 2 pub fn main() void { demo.zig +| 3 var x: u32 = 42; +| 4 _ = x; +| 5 } +| +| +| +| +| nm /tmp/pardes-snap/syntax/cwd Del +| +| demo.zig +| +| +| +| demo.zig +| +| +| +| nm /tmp/pardes-snap/syntax/cwd Del +| +| demo.zig +| +| +| +| +| +| +== style zig-open +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style colors-off +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style colors-on +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/syntax.golden b/test/snapshots/syntax.golden new file mode 100644 index 00000000..310d6d64 --- /dev/null +++ b/test/snapshots/syntax.golden @@ -0,0 +1,124 @@ +== snap zig-open grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/syntax/cwd/demo.zig Save Del nm /tmp/pardes-snap/syntax/cwd Del +| 1 const std = @import("std"); // greet +| 2 pub fn main() void { demo.zig +| 3 var x: u32 = 42; +| 4 _ = x; +| 5 } +| +| +| +| +| nm /tmp/pardes-snap/syntax/cwd Del +| +| demo.zig +| +| +| +| demo.zig +| +| +| +| nm /tmp/pardes-snap/syntax/cwd Del +| +| demo.zig +| +| +| +| +| +| +== style zig-open +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style colors-off +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== style colors-on +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-49 #969696,#2c2a3e, 50-51 d,#383c54, 52-85 #969696,#2c2a3e, 86-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-18 d,d, 19-25 #cc70d8,d,b 26-26 d,d, 27-31 #8ab87a,d, 32-34 d,d, 35-42 #f0f0f0,d,b 43-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-10 d,d, 11-12 #cc70d8,d,b 13-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-23 d,d, 24-25 #d0c070,d, 26-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-6 #5a5a5a,d, 7-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#383c54, 2-35 #969696,#2c2a3e, 36-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/syntax.snap b/test/snapshots/syntax.snap new file mode 100644 index 00000000..690e5d7d --- /dev/null +++ b/test/snapshots/syntax.snap @@ -0,0 +1,27 @@ +# tree-sitter: open a .zig file, keyword/string/number/comment colors on; +# Colors off clears them; edit re-highlights +file demo.zig const std = @import("std"); // greet\npub fn main() void {\n var x: u32 = 42;\n _ = x;\n} +start 30 100 +wait 8000 demo.zig +stable 700 20000 +press left 5 8 +release left 5 8 +stable 400 5000 +key i +text demo.zig +key esc +settle 700 +press right 6 8 +release right 6 8 +wait 10000 @import +stable 700 15000 +snap zig-open +snapstyle zig-open +press middle 25 1 +release middle 25 1 +stable 500 10000 +snapstyle colors-off +press middle 25 1 +release middle 25 1 +stable 500 10000 +snapstyle colors-on diff --git a/test/snapshots/tag.golden b/test/snapshots/tag.golden new file mode 100644 index 00000000..9275777b --- /dev/null +++ b/test/snapshots/tag.golden @@ -0,0 +1,217 @@ +== snap tag-focus grid=100x30 cursor=33,1 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwd Del nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tag-typed grid=100x30 cursor=46,1 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwd Del echo TAG''OK nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tag-exec grid=100x30 cursor=45,1 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwd Del echo TAG''OK nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| TAGOK +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tag-vsel grid=100x30 cursor=31,1 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwd Del echo TAG''OK nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| TAGOK +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== style tag-vsel +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-28 #969696,#2c2a3e, 29-31 #d8c8a8,#4a3a1e, 32-45 #969696,#2c2a3e, 46-49 d,#2c2a3e, 50-51 d,#383c54, 52-82 #969696,#2c2a3e, 83-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-32 #969696,#2c2a3e, 33-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +== snap tag-del grid=100x30 cursor=29,1 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwdl echo TAG''OK nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| TAGOK +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tag-exit grid=100x30 cursor=4,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tag/cwdl echo TAG''OK nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt t.txt +| +| TAGOK +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tag/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tag.snap b/test/snapshots/tag.snap new file mode 100644 index 00000000..f77808cb --- /dev/null +++ b/test/snapshots/tag.snap @@ -0,0 +1,41 @@ +# tag editor: click the tag row, edit the tail modally, execute a typed word +file t.txt x +start 30 100 +wait 8000 t.txt +stable 700 20000 +# click into the tag tail (after "Del", col past prefix) of pane 0 +press left 40 2 +release left 40 2 +stable 400 5000 +snap tag-focus +# append a word: A enters insert at end of tail +key A +send \x20echo\x20TAG''OK +key esc +settle 700 +stable 400 5000 +snap tag-typed +# v-select "echo TAG''OK" (col 4 .. line end) and execute it with Tab +key g h +key l l l l +key v +key g l +stable 400 5000 +key tab +wait 10000 TAGOK +stable 700 10000 +snap tag-exec +# v-select a few chars and delete them +key g h +stable 400 5000 +key v l l +stable 400 5000 +snap tag-vsel +snapstyle tag-vsel +key d +stable 400 5000 +snap tag-del +# esc: first collapses selection state, then leaves tag editing +key esc +settle 700 +snap tag-exit diff --git a/test/snapshots/theme.golden b/test/snapshots/theme.golden new file mode 100644 index 00000000..b90e0011 --- /dev/null +++ b/test/snapshots/theme.golden @@ -0,0 +1,186 @@ +== snap acme grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/theme/cwd Del nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt t.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== style acme +|0: 0-44 #000000,#eaffff, 45-99 d,#eaffff, +|1: 0-1 d,#6e4fd0, 2-34 #000000,#eaffff, 35-49 d,#eaffff, 50-51 d,#383c54, 52-84 #000000,#eaffff, 85-99 d,#eaffff, +|2: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|3: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|4: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|5: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|6: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|7: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|8: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|9: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|10: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|11: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|12: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|13: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|14: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|15: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|16: 0-1 d,#383c54, 2-34 #000000,#eaffff, 35-49 d,#eaffff, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|17: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|18: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|19: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|20: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|21: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|22: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|23: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|24: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|25: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|26: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|27: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|28: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +|29: 0-1 d,#ffffea, 2-49 #000000,#ffffea, 50-51 d,#ffffea, 52-99 #000000,#ffffea, +== snap colors-off grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/theme/cwd Del nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt t.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== style colors-off +|0: 0-44 #000000,#eaffff, 45-99 d,#eaffff, +|1: 0-1 d,#6e4fd0, 2-34 #000000,#eaffff, 35-49 d,#eaffff, 50-51 d,#383c54, 52-84 #000000,#eaffff, 85-99 d,#eaffff, +|2: 0-99 d,#ffffea, +|3: 0-1 d,#ffffea, 2-6 #000000,#ffffea, 7-51 d,#ffffea, 52-56 #000000,#ffffea, 57-99 d,#ffffea, +|4: 0-99 d,#ffffea, +|5: 0-99 d,#ffffea, +|6: 0-99 d,#ffffea, +|7: 0-99 d,#ffffea, +|8: 0-99 d,#ffffea, +|9: 0-99 d,#ffffea, +|10: 0-99 d,#ffffea, +|11: 0-99 d,#ffffea, +|12: 0-99 d,#ffffea, +|13: 0-99 d,#ffffea, +|14: 0-99 d,#ffffea, +|15: 0-99 d,#ffffea, +|16: 0-1 d,#383c54, 2-34 #000000,#eaffff, 35-49 d,#eaffff, 50-99 d,#ffffea, +|17: 0-99 d,#ffffea, +|18: 0-1 d,#ffffea, 2-6 #000000,#ffffea, 7-99 d,#ffffea, +|19: 0-99 d,#ffffea, +|20: 0-99 d,#ffffea, +|21: 0-99 d,#ffffea, +|22: 0-99 d,#ffffea, +|23: 0-99 d,#ffffea, +|24: 0-99 d,#ffffea, +|25: 0-99 d,#ffffea, +|26: 0-99 d,#ffffea, +|27: 0-99 d,#ffffea, +|28: 0-99 d,#ffffea, +|29: 0-99 d,#ffffea, +== snap dark-again grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/theme/cwd Del nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt t.txt +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/theme/cwd Del +| +| t.txt +| +| +| +| +| +| +| +| +| +| +| +== style dark-again +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#383c54, 52-84 #969696,#2c2a3e, 85-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|3: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|4: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|5: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|6: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|7: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|8: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|9: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|10: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|11: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|12: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|13: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|14: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|15: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|16: 0-1 d,#383c54, 2-34 #969696,#2c2a3e, 35-49 d,#2c2a3e, 50-51 d,#525252, 52-99 d,d, +|17: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|18: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|19: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|20: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|21: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|22: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|23: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|24: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|25: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|26: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|27: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|28: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, +|29: 0-1 d,#525252, 2-49 d,d, 50-51 d,#525252, 52-99 d,d, diff --git a/test/snapshots/theme.snap b/test/snapshots/theme.snap new file mode 100644 index 00000000..90ce5f85 --- /dev/null +++ b/test/snapshots/theme.snap @@ -0,0 +1,24 @@ +# topbar builtins: NextColor cycles to acme-light and back; Colors toggles +# the recolor passes off and on +file t.txt x +start 30 100 +wait 8000 t.txt +stable 700 20000 +press middle 32 1 +release middle 32 1 +stable 700 10000 +snap acme +snapstyle acme +press middle 25 1 +release middle 25 1 +stable 700 10000 +snap colors-off +snapstyle colors-off +press middle 25 1 +release middle 25 1 +stable 700 10000 +press middle 32 1 +release middle 32 1 +stable 700 10000 +snap dark-again +snapstyle dark-again diff --git a/test/snapshots/tty.golden b/test/snapshots/tty.golden new file mode 100644 index 00000000..7e6bebc5 --- /dev/null +++ b/test/snapshots/tty.golden @@ -0,0 +1,93 @@ +== snap tty-on grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| sy /tmp/pardes-snap/tty/cwd Del nm /tmp/pardes-snap/tty/cwd Del +| $ ls +| m.txt m.txt +| $ +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tty/cwd Del +| +| m.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tty-echo grid=100x30 cursor=4,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| sy /tmp/pardes-snap/tty/cwd Del nm /tmp/pardes-snap/tty/cwd Del +| $ ls +| m.txt m.txt +| $ echo SNAP''OK +| SNAPOK +| $ +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tty/cwd Del +| +| m.txt +| +| +| +| +| +| +| +| +| +| +| +== snap tty-off grid=100x30 cursor=4,6 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/tty/cwd Del nm /tmp/pardes-snap/tty/cwd Del +| +| m.txt m.txt +| +| SNAPOK +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tty/cwd Del +| +| m.txt +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tty.snap b/test/snapshots/tty.snap new file mode 100644 index 00000000..6d6e0f3e --- /dev/null +++ b/test/snapshots/tty.snap @@ -0,0 +1,16 @@ +# tty mode round-trip: Ctrl-b in, run a command, Ctrl-b out +file m.txt marker +start 30 100 +wait 8000 m.txt +stable 700 20000 +key c-b +stable 600 8000 +snap tty-on +text echo SNAP''OK +key enter +wait 8000 SNAPOK +stable 700 10000 +snap tty-echo +key c-b +stable 600 8000 +snap tty-off diff --git a/test/snapshots/ttyonly.golden b/test/snapshots/ttyonly.golden new file mode 100644 index 00000000..20ddf792 --- /dev/null +++ b/test/snapshots/ttyonly.golden @@ -0,0 +1,62 @@ +== snap ttyonly grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| sy /tmp/pardes-snap/ttyonly/cwd Del +| $ echo TTY''ONLY +| TTYONLY +| $ +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== style ttyonly +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#6e4fd0, 2-36 #969696,#2c2a3e, 37-99 d,#2c2a3e, +|2: 0-1 d,#525252, 2-99 d,d, +|3: 0-1 d,#525252, 2-99 d,d, +|4: 0-1 d,#525252, 2-99 d,d, +|5: 0-1 d,#525252, 2-99 d,d, +|6: 0-1 d,#525252, 2-99 d,d, +|7: 0-1 d,#525252, 2-99 d,d, +|8: 0-1 d,#525252, 2-99 d,d, +|9: 0-1 d,#525252, 2-99 d,d, +|10: 0-1 d,#525252, 2-99 d,d, +|11: 0-1 d,#525252, 2-99 d,d, +|12: 0-1 d,#525252, 2-99 d,d, +|13: 0-1 d,#525252, 2-99 d,d, +|14: 0-1 d,#525252, 2-99 d,d, +|15: 0-1 d,#525252, 2-99 d,d, +|16: 0-1 d,#525252, 2-99 d,d, +|17: 0-1 d,#525252, 2-99 d,d, +|18: 0-1 d,#525252, 2-99 d,d, +|19: 0-1 d,#525252, 2-99 d,d, +|20: 0-1 d,#525252, 2-99 d,d, +|21: 0-1 d,#525252, 2-99 d,d, +|22: 0-1 d,#525252, 2-99 d,d, +|23: 0-1 d,#525252, 2-99 d,d, +|24: 0-1 d,#525252, 2-99 d,d, +|25: 0-1 d,#525252, 2-99 d,d, +|26: 0-1 d,#525252, 2-99 d,d, +|27: 0-1 d,#525252, 2-99 d,d, +|28: 0-1 d,#525252, 2-99 d,d, +|29: 0-1 d,#525252, 2-99 d,d, diff --git a/test/snapshots/ttyonly.snap b/test/snapshots/ttyonly.snap new file mode 100644 index 00000000..c3d44063 --- /dev/null +++ b/test/snapshots/ttyonly.snap @@ -0,0 +1,11 @@ +# --tty: a single fullscreen shell already in raw tty mode, prompts visible +file t.txt x +start 30 100 --tty +wait 8000 $ +stable 700 20000 +text echo TTY''ONLY +key enter +wait 8000 TTYONLY +stable 700 10000 +snap ttyonly +snapstyle ttyonly diff --git a/test/snapshots/tutor.golden b/test/snapshots/tutor.golden new file mode 100644 index 00000000..55d66c9b --- /dev/null +++ b/test/snapshots/tutor.golden @@ -0,0 +1,31 @@ +== snap tutor grid=100x30 cursor=7,2 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /Tutor Save Del nm /tmp/pardes-snap/tutor/cwd Del +| 1 +| 2 PARDES TUTOR +| 3 tmux + vi + acme, from +| 4 +| 5 The model is acme's: EVERYTHING is +| 6 the same way. Modal editing (helix- +| 7 Press j until you reach the introdu +| 8 +| 9 +| nm /tmp/pardes-snap/tutor/cwd Del +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/tutor/cwd Del +| +| +| +| +| +| +| +| diff --git a/test/snapshots/tutor.snap b/test/snapshots/tutor.snap new file mode 100644 index 00000000..6322c92a --- /dev/null +++ b/test/snapshots/tutor.snap @@ -0,0 +1,8 @@ +# topbar middle-click Tutor opens the embedded tutor as a file pane top-left +start 30 100 +wait 8000 Kill Newcol +stable 700 20000 +press middle 13 1 +release middle 13 1 +stable 700 15000 +snap tutor diff --git a/test/snapshots/windowops.golden b/test/snapshots/windowops.golden new file mode 100644 index 00000000..061ceca9 --- /dev/null +++ b/test/snapshots/windowops.golden @@ -0,0 +1,372 @@ +== snap hover-v grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del โ nm /tmp/pardes-snap/windowops/cwd Del +| โ +| w.txt โ w.txt +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| nm /tmp/pardes-snap/windowops/cwd Del โ +| โ +| w.txt โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +== snap hover-h grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| +| +| +| +| +| +| +|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +== snap border-drag grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Delโ nm /tmp/pardes-snap/windowops/cwd Del +| โ +| w.txt โ w.txt +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| nm /tmp/pardes-snap/windowops/cwd Delโ +| โ +| w.txt โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +== snap border-done grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Delโ nm /tmp/pardes-snap/windowops/cwd Del +| โ +| w.txt โ w.txt +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| nm /tmp/pardes-snap/windowops/cwd Delโ +| โ +| w.txt โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +| โ +== snap hborder-done grid=100x30 cursor=4,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| +| +| +|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap move-preview grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap moved grid=100x30 cursor=4,15 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap altn grid=100x30 cursor=4,23 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +== snap focus-left grid=100x30 cursor=4,23 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +== snap debug-on grid=100x30 cursor=4,23 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowopโญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ +| โpardes resizes=1 โ +| w.txt w.txt โterms 4 cols 2 โ +| โactive #3 38x9 โ +| โscroll 0/9 โ +| โpinch 1.0000 โ +| โtscroll 0.0000 โ +| nm /tmp/pardes-snap/windowops/cwd Del โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ +| +| w.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +== style debug-on +|0: 0-44 #969696,#2c2a3e, 45-99 d,#2c2a3e, +|1: 0-1 d,#383c54, 2-38 #969696,#2c2a3e, 39-39 d,#2c2a3e, 40-41 d,#383c54, 42-69 #969696,#2c2a3e, 70-99 d,d, +|2: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-87 #969696,d, 88-98 d,#2a2a2a, 99-99 d,d, +|3: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-85 #969696,d, 86-98 d,#2a2a2a, 99-99 d,d, +|4: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-85 #969696,d, 86-98 d,#2a2a2a, 99-99 d,d, +|5: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-80 #969696,d, 81-98 d,#2a2a2a, 99-99 d,d, +|6: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-83 #969696,d, 84-98 d,#2a2a2a, 99-99 d,d, +|7: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-70 d,d, 71-85 #969696,d, 86-98 d,#2a2a2a, 99-99 d,d, +|8: 0-1 d,#383c54, 2-38 #969696,#2c2a3e, 39-39 d,#2c2a3e, 40-41 d,#525252, 42-99 d,d, +|9: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|10: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|11: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|12: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|13: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|14: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|15: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|16: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|17: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|18: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|19: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|20: 0-1 d,#6e4fd0, 2-38 #969696,#2c2a3e, 39-39 d,#2c2a3e, 40-41 d,#525252, 42-99 d,d, +|21: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|22: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|23: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|24: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|25: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|26: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|27: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|28: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +|29: 0-1 d,#525252, 2-39 d,d, 40-41 d,#525252, 42-99 d,d, +== snap debug-off grid=100x30 cursor=4,23 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/windowops/cwd Del nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt w.txt +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/windowops/cwd Del +| +| w.txt +| +| +| +| +| +| +| diff --git a/test/snapshots/windowops.snap b/test/snapshots/windowops.snap new file mode 100644 index 00000000..7e6cbee4 --- /dev/null +++ b/test/snapshots/windowops.snap @@ -0,0 +1,53 @@ +# hover resize hints, border drags, move drag, Alt-n, Ctrl-w focus, Debug box +file w.txt x +start 30 100 +wait 8000 w.txt +stable 700 20000 +# hover over the left column's last col: vertical dash hint +motion 50 10 +stable 400 5000 +snap hover-v +# hover over the top-left pane's last row: horizontal dash hint +motion 20 16 +stable 400 5000 +snap hover-h +# drag the vertical border 10 cols left +press left 50 10 +drag left 40 10 +stable 400 5000 +snap border-drag +release left 40 10 +stable 500 8000 +snap border-done +# drag the horizontal border up 4 rows (pane 0's new last row) +press left 20 16 +drag left 20 12 +release left 20 12 +stable 500 8000 +snap hborder-done +# move pane 1 (its gutter box) into the right column +press left 1 17 +drag left 70 8 +stable 400 5000 +snap move-preview +release left 70 8 +stable 500 8000 +snap moved +# Alt-n: a new shell below the active pane +key a-n +stable 700 15000 +snap altn +# Ctrl-w h: focus left +key c-w h +stable 400 5000 +snap focus-left +# Debug overlay on (topbar middle-click on Debug), then off +press middle 19 1 +release middle 19 1 +stable 400 8000 +snap debug-on +snapstyle debug-on +press middle 19 1 +release middle 19 1 +stable 400 8000 +snap debug-off |
