summaryrefslogtreecommitdiff
path: root/test/process/root_ctl.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 21:19:47 -0300
committerGabriel Schneider <[email protected]>2026-11-04 21:20:02 -0300
commite67a1a561d9a9a7269bcc7c9af5678d3f50a95cb (patch)
tree195593cc6ae9d72fcd1e37f08637c5eb038920be /test/process/root_ctl.zig
parentd6883afab40fb8cfcd40fc6abcde1aaf74b8b108 (diff)
downloadpardes-e67a1a561d9a9a7269bcc7c9af5678d3f50a95cb.tar.gz
pardes-e67a1a561d9a9a7269bcc7c9af5678d3f50a95cb.zip
main: the --tty flag again (it starts one shell pane in tty mode, the pane's raw mode, which the user keeps as tty, not the frontend): --tui and the old-flag case gone, the launch lines, the process runner's startTty and the cases' tty sessions as they were; the changelog says the frontend is the tui (-Dplatform=tui, src/tui/), the Tty builtin is Term and Tty still runs it; core, behaviour, fs-unit, pane and process tests (tui 36 of 36), all 113 snap scripts and the gui build pass
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/process/root_ctl.zig')
-rw-r--r--test/process/root_ctl.zig10
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"));
}