diff options
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 0f22614c..d6922390 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -724,6 +724,12 @@ test "Undo and Redo on a pane's ctl step its body through its edits" { try testing.expectEqualStrings("one\n", rd(p, body, 0, 64).bytes); try testing.expectEqual(Status.ok, wr(p, Node.of(serial, .ctl), "Redo").reply.status); try testing.expectEqualStrings("one\ntwo\n", rd(p, body, 0, 64).bytes); + // Nothing left: said, and the write still succeeds, as acme's is silent. + try testing.expectEqual(Status.ok, wr(p, Node.of(serial, .ctl), "Redo").reply.status); + try testing.expect(th.logHas(p, "Redo: nothing to redo")); + _ = wr(p, Node.of(serial, .ctl), "Undo"); + try testing.expectEqual(Status.ok, wr(p, Node.of(serial, .ctl), "Undo").reply.status); + try testing.expect(th.logHas(p, "Undo: nothing to undo")); } test "focus reads the pane with the keyboard, and a serial written to it moves the keyboard there" { |
