diff options
Diffstat (limited to 'test/process/root_ctl.zig')
| -rw-r--r-- | test/process/root_ctl.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/process/root_ctl.zig b/test/process/root_ctl.zig index f4a0149b..e3420ac5 100644 --- a/test/process/root_ctl.zig +++ b/test/process/root_ctl.zig @@ -118,16 +118,16 @@ fn redial(gpa: std.mem.Allocator, path: []const u8) !*Conn { } fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void { - for ([_]bool{ false, true }) |tui| { + for ([_]bool{ false, true }) |tty| { var arena = std.heap.ArenaAllocator.init(gpa); defer arena.deinit(); const a = arena.allocator(); - const name = if (tui) "restore tui space" else "restore detached space"; - var d = try process.Detached.start(gpa, exe, if (tui) "restore-root" else name, .{}); + const name = if (tty) "restore tty space" else "restore detached space"; + var d = try process.Detached.start(gpa, exe, if (tty) "restore-root" else name, .{}); defer d.deinit(); var term: ?process.Child = null; defer if (term) |*t| t.deinit(); - if (tui) term = try d.startTui(exe, name, &.{}); + if (tty) term = try d.startTty(exe, name, &.{}); const address = d.abs(try std.fmt.allocPrint(a, "pardes-9p-{s}.sock", .{name})); const old = try Conn.dial(gpa, address); defer old.deinit(gpa); @@ -179,7 +179,7 @@ fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void { defer screen.deinit(); const width = try std.unicode.utf8CountCodepoints(std.mem.sliceTo(try screen.screen(), '\n')); // A detached one is 160x50; a window keeps its own size. - if (process.backend == .tui) try std.testing.expectEqual(@as(usize, if (tui) 80 else 160), width); + if (process.backend == .tui) try std.testing.expectEqual(@as(usize, if (tty) 80 else 160), width); const opened = try restored.look(a, try std.fmt.allocPrint(a, "/n/own/os{s}", .{d.abs(try std.fmt.allocPrint(a, "{s}.txt", .{name}))}), ids[1]); try std.testing.expectEqualStrings("initial\n", try restored.pane(a, opened, "body")); } |
