summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index 397f3339..63e7e76a 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -2234,6 +2234,16 @@ test "a buffer whose file was deleted on disk is dirty, and Del asks first" {
try testing.expect(p.paneBySerial(serial) == null);
}
+test "a failure said while a 9P write waits on it posts no msg, only the write's err" {
+ const p = try withFile(testing.allocator, "x\n");
+ defer p.deinit();
+ p.fs.write_waits = true;
+ p.saveFailed(@intCast(p.active), "/nowhere/zz.txt", error.FileNotFound);
+ p.fs.write_waits = false;
+ try testing.expect(!th.logHas(p, "msg "));
+ try testing.expect(p.fs.late_failure_len > 0);
+}
+
test "every EINVAL a write gets says why, in its err record too; DEL is a control character in a line" {
const p = try withFile(testing.allocator, "x\n");
defer p.deinit();