diff options
Diffstat (limited to 'test/behaviour/event.zig')
| -rw-r--r-- | test/behaviour/event.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/behaviour/event.zig b/test/behaviour/event.zig index 77a80e30..65222175 100644 --- a/test/behaviour/event.zig +++ b/test/behaviour/event.zig @@ -69,3 +69,14 @@ test "event: a bad event record says what is wrong with it" { try std.testing.expect(has(s.said, c[1])); } } + +test "event: a write to the body is an EI record to the reader holding event" { + var s = try Session.initFile(std.testing.allocator, "replaced\n"); + defer s.deinit(); + const n = try s.focused(); + const event = try s.hold(s.at("/pane/{d}/event", .{n}), 0); + defer s.clunk(event); + try s.write(s.at("/pane/{d}/body", .{n}), "event\n"); + const record = try s.readFid(event); + try std.testing.expect(std.mem.startsWith(u8, record, "EI") and has(record, "event\n")); +} |
