diff options
Diffstat (limited to 'core/ninep/pty.zig')
| -rw-r--r-- | core/ninep/pty.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig index 0fd75aa2..96f2a6bf 100644 --- a/core/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -656,7 +656,7 @@ test "owned cwd pty exec rejects long paths before applying its batch" { const ctl = Node.of(pane.serial, .pty_ctl); var path: [1025]u8 = @splat('d'); path[0] = '/'; - p.setCwd(0, &path); + p.setCwd(.at(0), &path); for ([_][]const u8{ "exec\n", "winsize 100 30\nexec\n", "sig TERM\nexec\n" }) |command| { const result = wr(p, ctl, command); try testing.expectEqual(E.INVAL, result.errno()); @@ -664,7 +664,7 @@ test "owned cwd pty exec rejects long paths before applying its batch" { try testing.expect(result.signal == null and result.winsize == null); } try testing.expectEqualStrings(&path, pane.cwdSlice()); - p.setCwd(0, path[0..pardes.effect_path_cap]); + p.setCwd(.at(0), path[0..pardes.effect_path_cap]); const accepted = wr(p, ctl, "exec\n"); try testing.expectEqual(Status.ok, accepted.reply.status); try testing.expect(accepted.spawned); @@ -799,7 +799,7 @@ test "run answers how its command ended once the shell is back at a prompt" { try testing.expectEqual(Status.again, call(p, .{ .tag = 3, .op = .read, .node = node, .handle = early.reply.handle, .size = 64 }).reply.status); try testing.expect(std.mem.endsWith(u8, rd(p, status, 0, 64).bytes, " 1\n")); // A respawn before that prompt keeps it waiting for the new shell's. - p.acknowledgeShell(0, "/bin/sh", true); + p.acknowledgeShell(.at(0), "/bin/sh", true); try testing.expectEqual(Status.again, call(p, .{ .tag = 3, .op = .read, .node = node, .handle = early.reply.handle, .size = 64 }).reply.status); p.update(.{ .output = .{ .pane = 0, .bytes = prompt } }); var sent_late: [16]u8 = undefined; @@ -1114,7 +1114,7 @@ test "a terminal's ctl counts its body, and a new directory is a rename in the l const f = call(p, .{ .tag = 4, .op = .open, .node = log }).reply.handle; const frozen = call(p, .{ .tag = 5, .op = .read, .node = log, .handle = f, .size = 1 << 16 }).bytes.len; _ = call(p, .{ .tag = 6, .op = .write, .node = log, .handle = f, .data = "follow" }); - p.setCwd(0, "/somewhere/else"); + p.setCwd(.at(0), "/somewhere/else"); var want: [64]u8 = undefined; try testing.expectEqualStrings( try std.fmt.bufPrint(&want, "rename {d} /somewhere/else\n", .{serial}), |
