summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/pty.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig
index 6e7fe33e..be85a497 100644
--- a/src/ninep/pty.zig
+++ b/src/ninep/pty.zig
@@ -962,6 +962,7 @@ test "run on a command pane says no shell is there" {
test "a run's answer says cut when its output's start is gone, and reads a bounded tail" {
const gpa = testing.allocator;
+ if (pardes.Term.ops == null) return error.SkipZigTest; // it reads the emulator
const p = try withTerm(gpa);
defer p.deinit();
const node = Node.of(serialOf(p), .pty_run);
@@ -1048,7 +1049,7 @@ test "a run's answer says cut when its output's start is gone, and reads a bound
_ = std.fmt.bufPrint(&line, "{d:0>8}", .{i}) catch unreachable;
sh.put(p, &line);
}
- try testing.expect(!pane.terminal.?.stream.handler.out_start.?.garbage);
+ try testing.expect(!pardes.Term.emulatorOf(pane.terminal.?).stream.handler.out_start.?.garbage);
sh.put(p, d ++ prompt);
got = sh.answered(p, node, h, into);
try testing.expect(std.mem.startsWith(u8, got, "exit 0 cut\n"));
@@ -1061,14 +1062,14 @@ test "a run's answer says cut when its output's start is gone, and reads a bound
const q = try withTerm(gpa);
defer q.deinit();
const kept = q.panes[0].?;
- kept.terminal.?.vt.screens.get(.primary).?.pages.limits.set(.bytes, 1);
+ pardes.Term.emulatorOf(kept.terminal.?).vt.screens.get(.primary).?.pages.limits.set(.bytes, 1);
const run = Node.of(serialOf(q), .pty_run);
sh.put(q, prompt);
h = sh.send(q, run);
sh.put(q, c);
const lines = std.mem.asBytes(&@as([64][8]u8, @splat("pruned\r\n".*)));
var fed: usize = 0;
- while (!kept.terminal.?.stream.handler.out_start.?.garbage) : (fed += 1) {
+ while (!pardes.Term.emulatorOf(kept.terminal.?).stream.handler.out_start.?.garbage) : (fed += 1) {
if (fed == 1000) return error.TestUnexpectedResult;
sh.put(q, lines);
}