summaryrefslogtreecommitdiff
path: root/test/behaviour/keys.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/keys.zig')
-rw-r--r--test/behaviour/keys.zig14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig
index 6256a0b7..9eb33ac2 100644
--- a/test/behaviour/keys.zig
+++ b/test/behaviour/keys.zig
@@ -14,7 +14,7 @@ test "keys: a prompt's entry and cancellation leave the tag, the body and its cu
const n = try s.focused();
const tag = s.at("/pane/{d}/tag", .{n});
const dot = s.at("/pane/{d}/dot", .{n});
- try s.replace(tag, " keep");
+ try s.replace(tag, "keep");
for ([_]struct { keys: []const u8, shown: []const u8 }{
.{ .keys = "s", .shown = " s zq" },
.{ .keys = "|", .shown = " | zq" },
@@ -34,14 +34,15 @@ test "keys: a prompt's entry and cancellation leave the tag, the body and its cu
try s.keys("\x1b");
try std.testing.expectError(error.NotOnScreen, s.where(case.shown));
try std.testing.expect(std.mem.endsWith(u8, try s.read(s.at("/pane/{d}/ctl", .{n})), " mode:normal "));
- try std.testing.expectEqualStrings("/test.txt keep", try s.read(tag));
+ try std.testing.expectEqualStrings("/test.txt Del keep", try s.read(tag));
try std.testing.expectEqual(.{ 6, 6 }, try s.range(dot));
try s.expect(s.at("/pane/{d}/body", .{n}), "one\ntwo\n");
}
- // Save on a scratch asks for a path, starting from its directory.
+ // Save on a scratch (SPC f s: no word of its tag, UX K'3) asks for a
+ // path, starting from its directory.
const scratch = try s.newPane();
const scratch_tag = try s.read(s.at("/pane/{d}/tag", .{scratch}));
- try s.keys("::\tzq");
+ try s.keys(" fszq");
_ = try s.where("/zq");
try s.expect(s.at("/pane/{d}/tag", .{scratch}), scratch_tag);
try s.keys("\x1b");
@@ -124,7 +125,7 @@ test "keys: a count or a prefix a click or a change of pane cancels leaves nothi
.body => try s.click("abcdefghij", 3, 1),
.tag => {
// A clicked tag is in normal mode: `:` goes back.
- try s.click("/test.txt Save", "/test.txt ".len + 3, 1);
+ try s.click("/test.txt Del", "/test.txt ".len + 2, 1);
try s.keys(":");
},
.focus, .last => {
@@ -273,7 +274,8 @@ test "keys: Save's prompt on a scratch starts from the scratch's directory, one
// New from the file's pane: a scratch in its directory.
try s.write(s.at("/pane/{d}/exec", .{n}), "New\n");
try std.testing.expect(try s.focused() != n);
- try s.keys("::\tzq");
+ // SPC f s: Save is no word of a scratch's tag (UX K'3).
+ try s.keys(" fszq");
_ = try s.where(c[1]);
try s.keys("\x1b");
}