diff options
Diffstat (limited to 'test/process/tty_editing.zig')
| -rw-r--r-- | test/process/tty_editing.zig | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig index 53e1da1e..0ae99de7 100644 --- a/test/process/tty_editing.zig +++ b/test/process/tty_editing.zig @@ -365,13 +365,16 @@ fn pipe(gpa: std.mem.Allocator, exe: [:0]const u8) !void { fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "chordcut"); defer t.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + try t.config("Jumps new-pane"); try t.lines("f.txt", 5, ""); try t.lines("g.txt", 2, ""); // The narrow-window fallback splits below the source shell and leaves the // unrelated right column untouched. Give the caller enough cells that the selected // `echo B''OO g.txt` remains one displayed row; this test is about chords, not // soft-wrap traversal. - try t.start(31, 120, &.{ "-n", "3" }); + // A row more than its panes take: the notice row under them. + try t.start(32, 120, &.{ "-n", "3" }); try t.wait(8000, "f.txt"); try t.stable(700, 20000); // open f.txt: click a body spot, type the name, look it @@ -608,9 +611,12 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.start(41, 120, &.{"here.txt"}); try t.wait(8000, "here.txt"); try t.stable(700, 20000); - // SPC f is a group (Find, New, Save, Recent, Grep): the indicator waits + // SPC f is a group (Find, New, Save, Recent, Grep): its level rolled in + // the tag once SPC's delay is up (a frame on the clock, which a quiet + // screen does not wait for) try t.key("space"); try t.key("f"); + try t.wait(5000, "↓ unroll"); try t.stable(400, 5000); try t.snap("group"); // the second f opens the query pane: every file listed, line 1 `Find ` @@ -738,6 +744,8 @@ fn fsearch(gpa: std.mem.Allocator, exe: [:0]const u8) !void { fn grep(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "grep"); defer t.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + try t.config("Jumps new-pane"); try t.dir("sub"); try t.file("a.txt", "hello TARGET one\nnothing here\nlast TARGET line"); try t.file("sub/b.txt", "deep\nTARGET inside sub"); @@ -1325,6 +1333,8 @@ fn jumps(gpa: std.mem.Allocator, exe: [:0]const u8) !void { fn cmdword(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "cmdword"); defer t.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + try t.config("Jumps new-pane"); try t.file("cmds.txt", "@`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`"); try t.file("p.txt", "just text"); try t.file("zzmark.txt", "x"); @@ -1887,6 +1897,8 @@ fn lspdebug(gpa: std.mem.Allocator, exe: [:0]const u8) !void { fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "lsprelpath"); defer t.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + try t.config("Jumps new-pane"); try t.dir("sub"); try t.dir("sub/inner"); try t.file("shade.zig", "pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n"); @@ -1984,6 +1996,8 @@ fn lsp_rename(gpa: std.mem.Allocator, exe: [:0]const u8) !void { fn lsp_rename_files(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "lsp-rename-files"); defer t.deinit(); + // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6). + try t.config("Jumps new-pane"); try t.file("lib.rs", "// main.rs\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n"); try t.file("main.rs", "mod lib;\n\nfn main() {\n let x = add(1, 2);\n let y = add(3, 4);\n let _ = x + y;\n}\n"); try t.start(25, 100, &.{"lib.rs"}); |
