diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 03:56:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 34641e435fcbae0af578189760d5ebb05bc07f9a (patch) | |
| tree | 52957c9fe379df12199b605e68786077d66a68d6 /src/Effect.zig | |
| parent | 79a1e816ceb13ef81b712007716c8add2de75434 (diff) | |
| download | pardes-34641e435fcbae0af578189760d5ebb05bc07f9a.tar.gz pardes-34641e435fcbae0af578189760d5ebb05bc07f9a.zip | |
Term: a core without a terminal boots to a scratch pane, and a test skips only where it needs a terminal (docs/next-terminal.md, Phase 1, the no-terminal core): Pardes.init's shell boots (.shell, .classic, .tty, .tty_shell) are one scratch pane when Term.ops is null, so a test that booted a shell for convenience runs on it, where every one of them skipped before (Term.open refused with SkipZigTest under a test); Term.open refuses with error.NoTerminal, said by errorWords as Term.none, so Term and an exec no shell can take (a command pane) refuse in words (`Term: no terminal in this build`, `exec: ...`), and takesCommandLine is false with no terminal pane; a +Pager pages the bytes as they are (Term.page, unchanged); no boot message: the no-terminal core is a test build alone, read by no person, and a message at boot put seven core tests (the message log, the notice bands, the Del question's wake, a press on a column's rule) out of core-test; a test that fails for want of a terminal says so on its first line (`if (pardes.Term.ops == null) return error.SkipZigTest; // a shell`: a shell, a command pane, the classic boot's three shells, it reads the emulator, ...), 99 tests in 25 files, and ninep/testing.zig's withTerm, the fixture of 29 that assert a terminal pane, once; each attributed by its failure on the scratch boot (NoTerminal from newShell or newCommand, a shell's pane, prompt, pty bytes or tag asserted, the classic boot's panes indexed) and by reading its body; no assertion changes; test: Term.zig ends with the no-terminal core's three (each boot a scratch pane and no terminal; Term, newShell and an exec refused in words, no line typed at a shell; a program's output paged as plain text); core-test (no terminal) 411 passed / 535 skipped of 946 to 810 passed / 139 skipped of 949, shell-test 992: 989 passed, the three no-terminal tests skipped
Diffstat (limited to 'src/Effect.zig')
| -rw-r--r-- | src/Effect.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Effect.zig b/src/Effect.zig index 7f0c3fdf..08694e93 100644 --- a/src/Effect.zig +++ b/src/Effect.zig @@ -345,6 +345,7 @@ test "Detach asks the host to let its terminal go, and says so when there is not } test "Save on a scratch asks for a path in its inherited dir and makes it a file" { + if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells const p = try Pardes.init(std.testing.allocator, .{ .shells = 3, .cols = 100, .rows = 30 }); defer p.deinit(); while (p.nextEffect()) |_| {} @@ -378,6 +379,7 @@ test "Save on a scratch asks for a path in its inherited dir and makes it a file } test "Save on a terminal writes its plaintext scrollback and stays a terminal" { + if (pardes.Term.ops == null) return error.SkipZigTest; // a shell const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 8 }); defer p.deinit(); while (p.nextEffect()) |_| {} @@ -406,6 +408,7 @@ test "Save on a terminal writes its plaintext scrollback and stays a terminal" { } test "Save on an output buffer writes its rows out and leaves the buffer alone" { + if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .shells = 3, .cols = 100, .rows = 30 }); defer p.deinit(); @@ -458,6 +461,7 @@ test "Save on an output buffer writes its rows out and leaves the buffer alone" } test "Save takes the path as an argument, relative to the pane's own directory" { + if (pardes.Term.ops == null) return error.SkipZigTest; // a shell const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 40, .rows = 8 }); defer p.deinit(); while (p.nextEffect()) |_| {} @@ -557,6 +561,7 @@ test "Save elsewhere copies a file's bytes and keeps the pane on its own file" { } test "saves armed in one batch stay with their own panes" { + if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .shells = 3, .cols = 100, .rows = 30 }); defer p.deinit(); @@ -586,6 +591,7 @@ test "saves armed in one batch stay with their own panes" { } test "a save whose pane is gone before the drain writes nothing" { + if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .shells = 3, .cols = 100, .rows = 30 }); defer p.deinit(); @@ -640,6 +646,7 @@ test "Save reaches every tagline with text behind it and no other" { } test "a save path that names no file is refused before anything is rewritten" { + if (pardes.Term.ops == null) return error.SkipZigTest; // the classic boot's three shells const p = try Pardes.init(std.testing.allocator, .{ .shells = 3, .cols = 100, .rows = 30 }); defer p.deinit(); while (p.nextEffect()) |_| {} |
