summaryrefslogtreecommitdiff
path: root/test/behaviour/edit.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/edit.zig')
-rw-r--r--test/behaviour/edit.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/behaviour/edit.zig b/test/behaviour/edit.zig
index bfb17533..83b1b464 100644
--- a/test/behaviour/edit.zig
+++ b/test/behaviour/edit.zig
@@ -45,3 +45,15 @@ test "edit: Edit through a pane's ctl renames every foo in one undo step, and a
try s.write(ctl, "Undo");
try s.expect(body, "foo x foo y foo\n");
}
+
+test "edit: Edit's p and = never fail for want of room for +Errors: the text is logged instead" {
+ var s = try Session.initFile(std.testing.allocator, "one\ntwo\n");
+ defer s.deinit();
+ s.detach();
+ try s.write("/ctl", "size 80 6\n");
+ const index = try s.read("/index");
+ try s.write(s.at("/pane/{d}/ctl", .{try s.focused()}), "Edit ,p\n");
+ const log = try s.read("/log");
+ try std.testing.expect(std.mem.indexOf(u8, log, " one\n") != null and std.mem.indexOf(u8, log, " two\n") != null);
+ try s.expect("/index", index); // the +Errors that had no room is gone
+}