summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 3d6b6e28..b47119c4 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -1268,38 +1268,6 @@ test "acme placement: a pane made from the middle of a column moves only the one
try std.testing.expectEqual(was_bottom.h, p.rects[bottom].h);
}
-test "acme placement: New and 9P's new take the bottom half of the last pane" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
- defer p.deinit();
- p.newScratchBelow(p.active);
- const last = p.active;
- p.sync();
- const was = p.rects[last];
- p.newScratchFor(last, .fs);
- const made = p.active;
- p.sync();
- try std.testing.expectEqual(layout.findPane(p, last).?.idx + 1, layout.findPane(p, made).?.idx);
- try std.testing.expectEqual(was.y + was.h, p.rects[made].y + p.rects[made].h);
- try std.testing.expect(p.rects[made].y > was.y + BOX_H);
-}
-
-test "Placement pardes brings back the old rules, and says so in DumpConfig" {
- const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
- defer p.deinit();
- try std.testing.expect(p.executeBuiltinLine(p.active, "Placement pardes"));
- try std.testing.expectEqual(config.Runtime.Placement.pardes, p.settings.placement);
- const top = p.active;
- p.sync();
- const was = p.rects[top];
- p.newScratchBelow(top);
- p.sync();
- // Directly under the asking pane, as New always put it.
- try std.testing.expectEqual(@as(usize, 1), layout.findPane(p, p.active).?.idx);
- try std.testing.expectEqual(was.y + was.h, p.rects[p.active].y + p.rects[p.active].h);
- try std.testing.expect(p.executeBuiltinLine(p.active, "Placement"));
- try std.testing.expectEqual(config.Runtime.Placement.acme, p.settings.placement);
-}
-
test "an empty column shows its theme's empty_col under its tag: acme's white, else the border" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 120, .rows = 20 });
defer p.deinit();
@@ -2618,18 +2586,6 @@ test "a host with no methods at all is a complete in-process pardes" {
try std.testing.expect(p.quit);
}
-test "a builtin that needs a pane reports capacity failure when every slot is full" {
- const p = try Pardes.init(std.testing.allocator, .{ .shells = 3, .cols = 100, .rows = 30 });
- defer p.deinit();
- while (p.nextEffect()) |_| {}
- for (0..MAX_PANES) |id| if (p.panes[id] == null) {
- _ = try p.newDocPane(id);
- };
- const help = std.meta.stringToEnum(Builtin, "Help") orelse return error.MissingHelpBuiltin;
- exec.runBuiltin(p, help, 0, "", null);
- try std.testing.expect(std.mem.indexOf(u8, p.panes[0].?.msg[0..p.panes[0].?.msg_len], "help: no space for a pane") != null);
-}
-
test "Font keeps requested and acknowledged faces as separate plain state" {
if (comptime !font_picker) return; // there is no Font builtin on tty or web
const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
@@ -2718,26 +2674,6 @@ test "Font size suffix reaches native request and invalid input leaves it intact
try std.testing.expectEqual(@as(u16, 1850), p.settings.font.effective_size_hundredths);
}
-test "Pet command is SDL-only optional and validates its argument" {
- const p = try Pardes.init(std.testing.allocator, .{ .cols = 80, .rows = 24 });
- defer p.deinit();
- try std.testing.expectEqual(.off, p.settings.pet);
- if (comptime platform != .gui) {
- // A terminal's view has the word and takes it not.
- try std.testing.expect(p.executeBuiltinLine(p.active, "Pet cat"));
- try std.testing.expectEqual(.off, p.settings.pet);
- return;
- }
- try std.testing.expect(p.executeBuiltinLine(p.active, "Pet cat"));
- try std.testing.expectEqual(.cat, p.settings.pet);
- try std.testing.expect(p.executeBuiltinLine(p.active, "Pet dog"));
- try std.testing.expectEqual(.cat, p.settings.pet);
- try std.testing.expect(p.executeBuiltinLine(p.active, "Pet frog"));
- try std.testing.expectEqual(.frog, p.settings.pet);
- try std.testing.expect(p.executeBuiltinLine(p.active, "Pet off"));
- try std.testing.expectEqual(.off, p.settings.pet);
-}
-
test "startup config overrides restored styling before initFromDump returns" {
const source = try Pardes.init(std.testing.allocator, .{ .startup_config = "Theme dark\n" });
defer source.deinit();