diff options
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 4aa38292..a14b1efb 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -1671,6 +1671,16 @@ test "Save path of a file pane logs a save record naming that path" { try testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "save {d} /tmp/pardes-save-copy.txt\n", .{serial}))); } +test "an address looked at in an image pane names the image, never an empty subject" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + const id = p.freeSlot().?; + const doc = try p.newDocPane(id); + doc.image = .{ .path = try p.gpa.dupe(u8, "/tmp/pardes-pic.ppm") }; + _ = wr(p, Node.of(doc.serial, .look), ":/x/\n"); + try testing.expect(th.logHas(p, "look: /tmp/pardes-pic.ppm is no text to address")); +} + test "Save and Save path on an image pane are refused with why, never a silent success" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); |
