summaryrefslogtreecommitdiff
path: root/test/process/tree.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/process/tree.zig')
-rw-r--r--test/process/tree.zig15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/process/tree.zig b/test/process/tree.zig
index 358e7040..ee39170b 100644
--- a/test/process/tree.zig
+++ b/test/process/tree.zig
@@ -480,12 +480,15 @@ fn cutWrites(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var k: usize = 0;
while (body.next()) |line| : (k += 1) try expectEqualStrings(f.at("line {d:0>5} of the block", .{k}), line);
try expectEqual(@as(usize, 2500), k);
- // A detached session with no frontend is 160x50 until told.
- const cols, const rows = try screenSize(f);
- try expect(cols == 160 and rows == 50);
- try c.write("/ctl", "size 132 40\n");
- const cols2, const rows2 = try screenSize(f);
- try expect(cols2 == 132 and rows2 == 40);
+ // A detached session with no frontend is 160x50 until told; a
+ // window's size is its own, and refuses size.
+ if (process.backend == .tty) {
+ const cols, const rows = try screenSize(f);
+ try expect(cols == 160 and rows == 50);
+ try c.write("/ctl", "size 132 40\n");
+ const cols2, const rows2 = try screenSize(f);
+ try expect(cols2 == 132 and rows2 == 40);
+ }
}
fn rootAndOs(gpa: std.mem.Allocator, exe: [:0]const u8) !void {