summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/behaviour/panes.zig2
-rw-r--r--test/behaviour/settings.zig8
-rw-r--r--test/macos_e2e.swift4
-rw-r--r--test/output.zig4
-rw-r--r--test/process/tty_boot.zig15
-rw-r--r--test/process/tty_editing.zig6
-rw-r--r--test/process/window.zig7
-rw-r--r--test/replicas.zig53
-rw-r--r--test/snapshots/find.golden4
-rw-r--r--test/snapshots/fsearch.golden2
-rw-r--r--test/snapshots/grep.golden4
-rw-r--r--test/snapshots/lookrange.golden2
-rw-r--r--test/snapshots/lsp-client.golden2
-rw-r--r--test/snapshots/lsprelpath.golden4
-rw-r--r--test/snapshots/stepgrain.golden2
-rw-r--r--test/terminal.zig7
16 files changed, 96 insertions, 30 deletions
diff --git a/test/behaviour/panes.zig b/test/behaviour/panes.zig
index 67155776..dcde9c4d 100644
--- a/test/behaviour/panes.zig
+++ b/test/behaviour/panes.zig
@@ -888,7 +888,7 @@ test "panes: truncating body empties it, and a stat says the length after" {
}
test "panes: a rename colours a source its new name's language names, its text unchanged" {
- if (!@import("pardes_config").syntax_highlighting) return error.SkipZigTest;
+ if (@import("pardes_options").grammars == .disabled) return error.SkipZigTest;
var s = try Session.initFile(std.testing.allocator, "fn check() void {}\n");
defer s.deinit();
const n = try s.focused();
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig
index 66cd97df..cacee701 100644
--- a/test/behaviour/settings.zig
+++ b/test/behaviour/settings.zig
@@ -37,7 +37,7 @@ test "settings: Pet is the window's: a terminal's view refuses it; a window take
defer s.deinit();
// Which build, from its options, not from the answer: a terminal's view
// taking Pet must fail here, not pass as a window.
- if (comptime @import("pardes_config").platform == .gui) {
+ if (comptime @import("pardes_options").platform == .gui) {
try std.testing.expectEqualStrings("Pet off", try setting(&s, "Pet"));
try s.write("/ctl", "Pet cat\n");
try std.testing.expectEqualStrings("Pet cat", try setting(&s, "Pet"));
@@ -106,7 +106,7 @@ test "settings: a bad setting value is quoted, so two different bad values log a
test "settings: a setting this frontend cannot show says GUI-only, never run as a command, and DumpDir reads back" {
var s = try Session.initFile(std.testing.allocator, "x\n");
defer s.deinit();
- if (comptime @import("pardes_config").platform != .gui) {
+ if (comptime @import("pardes_options").platform != .gui) {
_ = try s.refused("/ctl", "GripWidth 120\n");
try std.testing.expectEqualStrings("GripWidth is GUI-only, invalid here \"GripWidth\"", s.said);
// A builtin the GUI alone has, written to a ctl or an exec, never
@@ -158,7 +158,7 @@ test "settings: Back and Forward written to exec keep to the focused file" {
});
}
-const syntax = @import("pardes_config").syntax_highlighting;
+const syntax = @import("pardes_options").grammars != .disabled;
/// The style /screen draws the cell `into` cells into the first place
/// `text` is drawn.
@@ -314,7 +314,7 @@ test "settings: the user's startup file loads clean, every word of it known and
const ctl = try s.read("/ctl");
for ([_][]const u8{ "Theme monokai_pro_classic\n", "CallstackDepth 64\n", "InactiveDim 5\n", "Shell fish\n", "JumpTrail on\n", "LocationsConfig context:4 tscontext:on tslocations:on layout:stacked\n" }) |line| try expectHas(ctl, line);
// The window's words, which a terminal's view leaves to the window.
- const window = @import("pardes_config").platform == .gui;
+ const window = @import("pardes_options").platform == .gui;
for ([_][2][]const u8{ .{ "GripWidth", "110" }, .{ "CursorBlink", "off" }, .{ "WindowOpacity", "100" }, .{ "TaglineSize", "80" }, .{ "Pet", "frog" } }) |w|
try expectHas(ctl, if (window) s.at("\n{s} {s}\n", .{ w[0], w[1] }) else s.at("\n# {s} unsupported\n", .{w[0]}));
}
diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift
index 74a03200..38d27808 100644
--- a/test/macos_e2e.swift
+++ b/test/macos_e2e.swift
@@ -51,7 +51,7 @@ private struct ScriptError: Error {
}
/// What the three C callbacks reach through `userdata`. A class, because a C
-/// function pointer cannot capture: a pointer the runtime struct carries is the
+/// function pointer cannot capture: a pointer the callbacks struct carries is the
/// only way back into Swift state.
private final class Host {
/// Set by `wakeup`, which runs on a pty reader thread. Nothing else in the
@@ -168,7 +168,7 @@ private final class Driver: PardesViewDelegate {
message: "the view measured \(got.cols)x\(got.rows) cells, not the \(cols)x\(rows) the script asked for")
}
- var runtime = pardes_runtime_s(
+ var runtime = pardes_callbacks_s(
userdata: Unmanaged.passUnretained(host).toOpaque(),
wakeup: { ud in
// A pty reader thread. One flag and out — see Host.woke.
diff --git a/test/output.zig b/test/output.zig
index 38e8ba0d..c5ddddd5 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -549,7 +549,7 @@ test "a window's setting builtins (TaglineSize, Font) reach the report DumpConfi
defer font_arena.deinit();
var chosen_font: ?[]const u8 = null;
var buf: [512]u8 = undefined;
- for (config.Runtime.settings) |setting| {
+ for (config.Settings.settings) |setting| {
// The view's own (a terminal's takes no window's words).
if (!setting.enabled(builtins.viewCapabilities(p))) continue;
const command: []const u8 = switch (setting.action) {
@@ -786,7 +786,7 @@ test "identical result refresh keeps warm content caches without allocation" {
const index = try panes.File.lineIndex(p.gpa, file);
const styles = try std.testing.allocator.dupe(u8, file.highlights);
defer std.testing.allocator.free(styles);
- if (@import("pardes_config").syntax_zig_grammar) try std.testing.expect(styles.len > 0);
+ if (@import("pardes_options").grammars != .disabled) try std.testing.expect(styles.len > 0);
const revision = file.revision;
const saved_revision = file.saved_revision;
const body_ptr = file.content.ptr;
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index a5f42074..741f6260 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -300,6 +300,9 @@ fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// when it comes up. Both headers used to run the word under the PRESS, on
// the press, so a sweep of `echo SWEPT-COL` ran a bare `echo`. A right sweep
// looks for what it swept the same way, and the other button cancels.
+// What a sweep ran is waited for in its pane's tag, `(echo SW''EPT-COL) exit
+// 0`, which stays: the echo's line shows in the pane's one body row only
+// until `exit 0` follows it, and a loaded machine draws both in one frame.
fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "headersweep");
defer t.deinit();
@@ -321,7 +324,7 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.style("col-sweeping");
try t.drag("middle", "@echo+16", 2);
try t.release("middle", "@echo+16", 2);
- try t.wait(8000, "SWEPT-COL");
+ try t.wait(8000, "EPT-COL) exit 0");
try t.stable(700, 15000);
try t.snap("col-swept");
// the workspace tag, the same
@@ -335,7 +338,7 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@echo", 1);
try t.drag("middle", "@echo+15", 1);
try t.release("middle", "@echo+15", 1);
- try t.wait(8000, "SWEPT-WS");
+ try t.wait(8000, "EPT-WS) exit 0");
try t.stable(700, 15000);
try t.snap("ws-swept");
// a right sweep over part of a word looks for the part: `hay.txt` opens,
@@ -399,7 +402,7 @@ fn headersweep_restored(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.style("col-sweeping");
try t.drag("middle", "@echo+19", 2);
try t.release("middle", "@echo+19", 2);
- try t.wait(8000, "RESTORED-COL");
+ try t.wait(8000, "-COL) exit 0");
try t.stable(700, 15000);
try t.snap("col-swept");
try t.press("left", "118", 1);
@@ -415,7 +418,7 @@ fn headersweep_restored(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.style("ws-sweeping");
try t.drag("middle", "@echo+18", 1);
try t.release("middle", "@echo+18", 1);
- try t.wait(8000, "RESTORED-WS");
+ try t.wait(8000, "-WS) exit 0");
try t.stable(700, 15000);
try t.snap("ws-swept");
try t.done();
@@ -869,6 +872,10 @@ fn winch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(31, 100, &.{ "-n", "3" });
try t.stable(700, 20000);
try t.key("c-b");
+ // Its shell at its prompt after its `ls` (a row of the 50-column pane
+ // holding `$` alone): typed into earlier, a loaded machine's bash echoed
+ // the line before its readline was up, or ran it before the `ls`.
+ try t.wait(20000, "\n $" ++ @as([47]u8, @splat(' ')));
try t.stable(600, 8000);
try t.send("for i in $(seq 600); do kill -WINCH $PPID; done; echo SUR''VIVED");
try t.key("enter");
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index b5f0495c..63c75512 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -783,6 +783,12 @@ fn grep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("g");
try t.stable(400, 5000);
try t.send("zzqq");
+ // Its count once the search is over (`0`): `0+` is while it still
+ // counts (its pause on the clock, then the worker), which a quiet
+ // machine's frame shows and a loaded one's not. The query typed in
+ // first: the pane's empty query counts `0` too.
+ try t.wait(10000, "Grep zzqq");
+ try t.wait(10000, "+Search 0 ");
try t.stable(700, 10000);
try t.snap("nomatch");
try t.key("esc");
diff --git a/test/process/window.zig b/test/process/window.zig
index 687b9000..00450a9b 100644
--- a/test/process/window.zig
+++ b/test/process/window.zig
@@ -426,8 +426,11 @@ fn corpus(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try d.mouse("wheel", -3, cell_w * 40, cell_h * 12);
try k.keep(&d, from, "11 a wheel's glide, every frame", true);
from = try k.mark(&d);
- try d.mouse("down", 1, cell_w * 20, cell_h * 10);
- try d.mouse("up", 1, cell_w * 20, cell_h * 10);
+ // The press and its release in one write (Detached.mouse's events),
+ // so the window reads them in one pass: written apart, a loaded
+ // machine let it read the press alone and draw a frame between, one
+ // more kept frame than the base's (78) and every one after shifted.
+ try d.typeKeys(f.at("\x1b]777;mouse;down;1;{d};{d}\x07\x1b]777;mouse;up;1;{d};{d}\x07", .{ cell_w * 20, cell_h * 10, cell_w * 20, cell_h * 10 }));
try k.keep(&d, from, "11 a click moves the caret, every frame", true);
from = try k.mark(&d);
try d.typeKeys("gg");
diff --git a/test/replicas.zig b/test/replicas.zig
index 91a68861..ffe82790 100644
--- a/test/replicas.zig
+++ b/test/replicas.zig
@@ -53,6 +53,10 @@ const gpa = std.heap.c_allocator;
pub const std_options: std.Options = .{ .log_level = .warn };
extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
var trace = false;
+/// `--bytes`: its clients are replicas of the bytes kind, each terminal fed
+/// the pty's bytes its units carry into an emulator of its own, joined from
+/// a dump with every emulator whole (core/replica.zig `Peers.bytes`).
+var bytes_kind = false;
/// The PDF the soak opens (`--pdf`), absolute.
var pdf_path: ?[]const u8 = null;
const frame_us = 16_667;
@@ -791,6 +795,9 @@ const Soak = struct {
/// encoding cost.
framed: bool = false,
encode_ns: u64 = 0,
+ /// The session's pty told the answer to the program's kitty query
+ /// (`questions`): once, whatever the clients.
+ kitty_answers: u32 = 0,
/// A Peer's queue, swapped out as its writer swaps it (the Peers'
/// allocator's).
sending: std.ArrayListUnmanaged(u8) = .empty,
@@ -809,6 +816,9 @@ const Soak = struct {
fn ptyWrite(ctx: ?*anyopaque, id: pardes.Pane.Id, bytes: []const u8) void {
const pane = id.index();
const s = of(ctx);
+ // Only the session's emulator answers its program: a client's
+ // answers are its tape's, never written (`questions`).
+ if (std.mem.indexOf(u8, bytes, "\x1b_Gi=31;OK") != null) s.kitty_answers += 1;
s.echo.append(gpa, .{ .pane = pane, .bytes = gpa.dupe(u8, bytes) catch return }) catch {};
}
@@ -873,6 +883,7 @@ const Soak = struct {
pub fn open(s: *Soak, l: *SessionLoop) !pardes.Host {
s.l = l;
l.peers.threads = false;
+ l.peers.bytes = bytes_kind;
l.peers.flushed = .{ .ctx = s, .f = flushed };
const host: pardes.Host = .{ .ctx = s, .vtable = &vtable };
l.core.host = host;
@@ -939,6 +950,9 @@ const Soak = struct {
const at: u64 = switch (c) {
0, 1 => s.random.uintLessThan(u64, 100_000),
2 => 1_200_000,
+ // One joins in the middle of the flood, its emulators loaded
+ // whole and every other side's reloaded.
+ 3 => if (bytes_kind) flood_at + 100_000 else 2_300_000,
else => 2_000_000 + c * 100_000,
};
try net.send(.{ .at = at, .n = 0, .kind = .dial, .who = @intCast(c + 1), .bytes = &.{} });
@@ -1410,6 +1424,11 @@ const Soak = struct {
}
const rp = try replica.Replica.initDump(gpa, cl.id, cl.view, m.bytes, .{ .cols = cl.cols, .rows = cl.rows, .distrusted = &cl.distrusted });
cl.r = rp;
+ // Its terminals its own emulators, fed what the units carry.
+ if (bytes_kind) {
+ rp.t.screen_state = false;
+ rp.core().echo = null;
+ }
rp.stats.samples = true;
rp.t.local_files = true;
rp.echo.now = m.at * 1000;
@@ -1447,6 +1466,11 @@ const Soak = struct {
totals.flood_us += s.flood_end -| flood_at;
for (s.flood_deltas[0..s.clients.len]) |d| totals.flood_deltas += d;
const want = pardes.tape.digestOf(core);
+ if (bytes_kind) std.debug.print("seed {d} rtt {d} ms: a join's step at worst {d} us (the session's reloads and its dump), the last dump {d} KB ({d} KB of state)\n", .{ s.r.seed, s.r.rtt_ms, s.l.peers.join_ns / 1000, s.l.peers.dump_bytes >> 10, s.l.peers.state_bytes >> 10 });
+ if (bytes_kind and s.kitty_answers != 1) {
+ totals.unequal += 1;
+ std.debug.print("seed {d} rtt {d} ms: the program's kitty query was answered {d} times on the session's pty\n", .{ s.r.seed, s.r.rtt_ms, s.kitty_answers });
+ }
for (s.clients, 1..) |*cl, id| {
totals.resizes += cl.resizes;
totals.wakes += cl.wakes;
@@ -1558,7 +1582,11 @@ fn run(init: std.process.Init, r: Run, dir: []const u8, totals: *Totals) !void {
// flood of `yes`, read 4 KB at a time as a pty gives it.
const tui = try screen_state.tuiStream(gpa);
defer gpa.free(tui);
- const shell_session = try screen_state.shellStream(gpa);
+ const session_only = try screen_state.shellStream(gpa);
+ defer gpa.free(session_only);
+ const asked = if (bytes_kind) try questions(dir) else "";
+ defer if (bytes_kind) gpa.free(asked);
+ const shell_session = try std.mem.concat(gpa, u8, &.{ session_only, asked });
defer gpa.free(shell_session);
const yes = try screen_state.yesStream(gpa, @intCast(r.flood_mb * (1 << 20) / 3));
defer gpa.free(yes);
@@ -1582,6 +1610,23 @@ fn run(init: std.process.Init, r: Run, dir: []const u8, totals: *Totals) !void {
if (soak.err) |err| return err;
}
+/// What the shell's program asks its terminal at the end of its session
+/// (`--bytes`): device attributes, the cursor's place, the cell's size in
+/// pixels, a kitty query; then a kitty image by direct data, shown, and one
+/// by a file of the session's machine, stored (a=t), which no client loads
+/// (P32): absent there, as every live terminal's image is under screen
+/// state. Shown (a=T) it would move the session's cursor past it and not a
+/// client's: a divergence until the file's bytes are taped (a later step).
+fn questions(dir: []const u8) ![]u8 {
+ var path_buf: [300]u8 = undefined;
+ const path = try std.fmt.bufPrintSentinel(&path_buf, "{s}/pixels.rgb", .{dir}, 0);
+ try writeText(path, &@as([12]u8, @splat(0x7f)));
+ var b64: [400]u8 = undefined;
+ const name = std.base64.standard.Encoder.encode(&b64, path);
+ return std.fmt.allocPrint(gpa, "\x1b[c\x1b[6n\x1b[16t\x1b_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\\\r\n" ++
+ "\x1b_Ga=T,i=5,f=24,s=2,v=2;AAAAAAAAAAAAAAAA\x1b\\\r\n\x1b_Ga=t,i=6,t=f,f=24,s=2,v=2;{s}\x1b\\\r\n$ ", .{name});
+}
+
/// A typist: keys 50-200 ms apart, a pause now and then.
fn typistGap(random: std.Random) u64 {
return if (random.uintLessThan(u8, 12) == 0) random.intRangeAtMost(u64, 300_000, 1_500_000) else random.intRangeAtMost(u64, 50_000, 200_000);
@@ -2720,6 +2765,10 @@ pub fn main(init: std.process.Init) !void {
echo_mode = true;
continue;
}
+ if (std.mem.eql(u8, name, "--bytes")) {
+ bytes_kind = true;
+ continue;
+ }
if (i + 1 >= args.len) return error.MissingValue;
i += 1;
const value = args[i];
@@ -2785,7 +2834,9 @@ pub fn main(init: std.process.Init) !void {
defer stop_lines.deinit(gpa);
for (rtts) |rtt| {
var t: Totals = .{};
+ pardes.Term.reloads = .{};
for (first..first + seeds) |seed| try run(init, .{ .seed = seed, .rtt_ms = rtt, .steps = steps, .clients = clients, .flood_mb = flood_mb }, dir, &t);
+ if (bytes_kind) std.debug.print("rtt {d}: {d} reloads of a terminal at joins, every side (the session's own too), {d} us each, {d} us at worst\n", .{ rtt, pardes.Term.reloads.n, pardes.Term.reloads.ns / @max(1, pardes.Term.reloads.n) / 1000, pardes.Term.reloads.worst_ns / 1000 });
const rollbacks = t.mispredicted + t.foreign;
std.debug.print("{d:>4} {d:>6} {d:>7} {d:>7} {d:>6} {d:>6} {d:>6} ({d}+{d}) {d:>5.1}% {d:>6} {d:>5}/{d:<6} {d:>5}/{d:<5} ({d}) {d:>7}/{d:<7} {d:>8} {d:>7}\n", .{
rtt, t.inputs, t.speculated,
diff --git a/test/snapshots/find.golden b/test/snapshots/find.golden
index 6c3bc950..4825d1dc 100644
--- a/test/snapshots/find.golden
+++ b/test/snapshots/find.golden
@@ -30,7 +30,7 @@
|32: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Del
|33: 1 beta body
== snap promoted grid=120x41 cursor=7,33
-|22: +Search 2/3 Save Unattach Del
+|22: +Search 2/3 Save Undock Del
|32: /tmp/pardes-snap/find/cwd/sub/ZQMARK-beta.txt Save Term Collapse Follow Del
== snap nomatch grid=120x41 cursor=11,14
|13: ^ +Search 0 Del
@@ -43,7 +43,7 @@
== snap cancel grid=120x41 cursor=7,3
|13:
|14:
-|22: +Search 2/3 Save Unattach Del
+|22: +Search 2/3 Save Undock Del
|23: Find zqm
|24: zqmark-alpha.txt
|25: sub/ZQMARK-beta.txt
diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden
index e923cb58..71a9900a 100644
--- a/test/snapshots/fsearch.golden
+++ b/test/snapshots/fsearch.golden
@@ -71,7 +71,7 @@
|8: 6 MARK b
|9: ^ +Search 2/3 Del
== snap landed grid=180x31 cursor=10,8
-|9: +Search 2/3 Save Unattach Del
+|9: +Search 2/3 Save Undock Del
== snap n grid=180x31 cursor=10,8
|7: 9 l9
|8: 10 MARK c
diff --git a/test/snapshots/grep.golden b/test/snapshots/grep.golden
index 30c8612c..52633372 100644
--- a/test/snapshots/grep.golden
+++ b/test/snapshots/grep.golden
@@ -36,10 +36,10 @@
|14: 1 deep
|15: 2 TARGET inside sub
== snap opened-hit grid=180x31 cursor=12,15
-|9: +Search 3/3 Save Unattach Del
+|9: +Search 3/3 Save Undock Del
|13: /tmp/pardes-snap/grep/cwd/sub/b.txt Save Term Collapse Follow Del
== snap nomatch grid=180x31 cursor=11,15
-|14: ^ +Search 0+ Del
+|14: ^ +Search 0 Del
|15: Grep zzqq
== snap esc grid=180x31 cursor=12,15
|14: 1 deep
diff --git a/test/snapshots/lookrange.golden b/test/snapshots/lookrange.golden
index 92b619e4..c677fb8f 100644
--- a/test/snapshots/lookrange.golden
+++ b/test/snapshots/lookrange.golden
@@ -69,7 +69,7 @@
|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-11 #e5eee5,#0d1410, 12-149 #f5f7ee,#3c614a,
|16: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-149 #f5f7ee,#0d1410,
== snap hit1 grid=150x31 cursor=17,15
-|21: +Search 2/2 Save Unattach Del
+|21: +Search 2/2 Save Undock Del
|22: /NEEDLE
|23: r.txt:7:4 gg NEEDLE gg
|24: r.txt:8:6 hhhh NEEDLE
diff --git a/test/snapshots/lsp-client.golden b/test/snapshots/lsp-client.golden
index 44b16309..42c378d1 100644
--- a/test/snapshots/lsp-client.golden
+++ b/test/snapshots/lsp-client.golden
@@ -26,5 +26,5 @@
|19: /tmp/pardes-snap/lsp-client/cwd/+Preview Del
|20: 1
== snap gr-opened grid=100x25 cursor=21,6
-|13: +Search 2/3 Save Unattach Del
+|13: +Search 2/3 Save Undock Del
== snap gr-back grid=100x25 cursor=21,7
diff --git a/test/snapshots/lsprelpath.golden b/test/snapshots/lsprelpath.golden
index 36f411ef..964f0286 100644
--- a/test/snapshots/lsprelpath.golden
+++ b/test/snapshots/lsprelpath.golden
@@ -29,7 +29,7 @@
| 1
== snap abslook grid=100x35 cursor=21,27
|3: 1 const shade = @import("../shade.zig");
-|16: +Search 1/2 Save Unattach Del
+|16: +Search 1/2 Save Undock Del
|26: /tmp/pardes-snap/lsprelpath/cwd/shade.zig Save Term Collapse Follow TreeContext Def Refs Del
|27: 1 pub const Shade = enum {
|28: 2 verdigris,
@@ -103,7 +103,7 @@
| 1
== snap sublook grid=100x35 cursor=20,28
|3: 1 const tint = @import("inner/tint.zig");
-|16: +Search 1/2 Save Unattach Del
+|16: +Search 1/2 Save Undock Del
|26: /tmp/pardes-snap/lsprelpath/cwd/sub/inner/tint.zig Save Term Collapse Follow TreeContext Def Refs
|27: Del
|28: 1 pub const Tint = enum {
diff --git a/test/snapshots/stepgrain.golden b/test/snapshots/stepgrain.golden
index 1b7d3245..9af17689 100644
--- a/test/snapshots/stepgrain.golden
+++ b/test/snapshots/stepgrain.golden
@@ -84,5 +84,5 @@
|18: 0-0 d,#608269, 1-149 d,#0d1410,
|22: 0-1 d,#496656, 2-32 #b2c3b8,#1d2824, 33-46 #d3b0d9,#1d2824, 47-149 #b2c3b8,#1d2824,
== snap blank-opened grid=150x31 cursor=7,23
-|12: +Search 1/1 Save Unattach Del
+|12: +Search 1/1 Save Undock Del
|22: /tmp/pardes-snap/stepgrain/cwd/two words.txt Save Term Collapse Follow Del
diff --git a/test/terminal.zig b/test/terminal.zig
index e6c530d5..b7b9cd33 100644
--- a/test/terminal.zig
+++ b/test/terminal.zig
@@ -34,7 +34,6 @@ const prompt = Term.prompt;
const scroll = Term.scroll;
const scrollback = Term.scrollback;
const commandOutput = Term.commandOutput;
-const petscii = Term.petscii;
const filterOf = emu.filterOf;
const filterPalette = emu.filterPalette;
const keyedRgb = emu.keyedRgb;
@@ -892,7 +891,7 @@ test "a terminal's image is a placement whatever the frontend draws, and the Pet
try pardes.dump.dumpState(p);
const restored = try pardes.dump.restore(p, p.dump_out.?, "/tmp/pardes.dump.zon");
defer restored.deinit();
- try std.testing.expectEqual(@as(?bool, true), petscii(restored.panes[0].?.terminal));
+ try std.testing.expect(restored.panes[0].?.term_petscii);
try std.testing.expect(p.executeBuiltinLine(0, "Petscii"));
_ = frame.reset(.retain_capacity);
s = try p.render(frame.allocator());
@@ -904,12 +903,12 @@ test "a new terminal draws its program's images as pixels, and one without image
const gpa = std.testing.allocator;
const p = try Pardes.init(gpa, .{ .cols = 80, .rows = 24, .shells = 1 });
defer p.deinit();
- try std.testing.expectEqual(false, petscii(p.panes[0].?.terminal).?);
+ try std.testing.expect(!p.panes[0].?.term_petscii);
// A pane without images says nothing of them.
try std.testing.expect(std.mem.indexOf(u8, try tagline.tagPrefix(p, p.panes[0].?), "petscii") == null);
const id = p.freeSlot().?;
const fresh = try p.newShell(id, "");
- try std.testing.expectEqual(false, petscii(fresh.terminal).?);
+ try std.testing.expect(!fresh.term_petscii);
}
test "a program asking the cell size in pixels (CSI 16 t) is told the shell's" {