diff options
Diffstat (limited to 'src/Core.zig')
| -rw-r--r-- | src/Core.zig | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Core.zig b/src/Core.zig index 7d8cfb0e..070c4272 100644 --- a/src/Core.zig +++ b/src/Core.zig @@ -371,7 +371,7 @@ surface: Surface = .{}, /// A replica's predicted echo (src/term/echo.zig), drawn over its terminals: /// presentation, its own, in no digest and no rollback copy. Null on a /// session's own core. -echo: ?*pardes.Term.Echo = null, +echo: ?*pardes.Echo = null, /// The live view, `views[live]` (`view()`): whose input the session /// takes now, and whose share of the panes is in their own fields /// (views.zig). `views_open` says which views there are, one a window @@ -2486,6 +2486,7 @@ test "TreeContext command and custom tag survive a workspace round trip" { test "Filter is ordered after Del and toggles only its terminal or +Pager pane" { const testing = std.testing; + if (pardes.Term.ops == null) return error.SkipZigTest; // it reads the emulator const del = std.meta.stringToEnum(Builtin, "Del") orelse return error.MissingDelBuiltin; const filter = std.meta.stringToEnum(Builtin, "Filter") orelse return error.MissingFilterBuiltin; try testing.expectEqual(@backingInt(del) + 1, @backingInt(filter)); @@ -2494,12 +2495,12 @@ test "Filter is ordered after Del and toggles only its terminal or +Pager pane" defer p.deinit(); while (p.nextEffect()) |_| {} const first = p.panes[0].?; - const palette_before = first.terminal.?.vt.colorForXterm(.{ .palette = 1 }).?; + const palette_before = pardes.Term.emulatorOf(first.terminal.?).vt.colorForXterm(.{ .palette = 1 }).?; try testing.expect(first.tty_filter); try testing.expect(p.executeBuiltinLine(0, "Filter")); try testing.expect(!first.tty_filter); - try testing.expect(palette_before.eql(first.terminal.?.vt.colorForXterm(.{ .palette = 1 }).?)); + try testing.expect(palette_before.eql(pardes.Term.emulatorOf(first.terminal.?).vt.colorForXterm(.{ .palette = 1 }).?)); const second_id = p.freeSlot().?; const second = try p.newShell(second_id, ""); @@ -3762,6 +3763,7 @@ test "the bare tty startup opens a text pane under the shell, unfocused" { } test "tty output follows only from the bottom" { + if (pardes.Term.ops == null) return error.SkipZigTest; // a shell, opened by a key const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24, .file = "mise.toml" }); defer p.deinit(); p.update(.{ .resize = .{ .cols = 80, .rows = 24 } }); @@ -3921,6 +3923,7 @@ test "pasted bytes still queued at shutdown are freed, not leaked" { } test "leaving tty hides the prompt and keeps the command typed at it" { + if (pardes.Term.ops == null) return error.SkipZigTest; // a shell, opened by a key const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }); defer p.deinit(); @@ -3986,6 +3989,7 @@ test "leaving tty hides the prompt and keeps the command typed at it" { } test "entering tty walks the shell cursor to the column clicked past the prompt" { + if (pardes.Term.ops == null) return error.SkipZigTest; // a shell, opened by a key const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .cols = 80, .rows = 24, .file = "mise.toml" }); defer p.deinit(); |
