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, 7 insertions, 0 deletions
diff --git a/src/ninep/pty.zig b/src/ninep/pty.zig
index 0f5202cc..390ae58d 100644
--- a/src/ninep/pty.zig
+++ b/src/ninep/pty.zig
@@ -960,6 +960,7 @@ test "a run's answer says cut when its output's start is gone, and reads a bound
var got = sh.answered(p, node, h, into);
try testing.expect(std.mem.startsWith(u8, got, "exit 0 cut\n"));
+
// A resize between its start and end reflows the pins with the text.
h = sh.send(p, node);
sh.put(p, c ++ "one\r\ntwo\r\n");
@@ -1022,6 +1023,12 @@ test "a run's answer says cut when its output's start is gone, and reads a bound
sh.put(p, d ++ prompt);
p.gpa = gpa;
try testing.expectEqualStrings("error out of memory\n", sh.answered(p, node, h, into));
+ // An end drawn above the start (the prompt redrawn over what was
+ // printed, as in a window two rows high): cut, never an empty whole.
+ h = sh.send(p, node);
+ sh.put(p, c ++ "printed\r\nmore\r\n\x1b[4A" ++ d ++ prompt);
+ got = sh.answered(p, node, h, into);
+ try testing.expect(std.mem.startsWith(u8, got, "exit 0 cut\n"));
}
test "a terminal's ctl counts its body, and a new directory is a rename in the log" {