diff options
| -rw-r--r-- | core/Addon.zig | 2 | ||||
| -rw-r--r-- | core/Core.zig | 6 | ||||
| -rw-r--r-- | core/Dir.zig | 2 | ||||
| -rw-r--r-- | core/Effect.zig | 2 | ||||
| -rw-r--r-- | core/Query.zig | 2 | ||||
| -rw-r--r-- | core/dump.zig | 6 | ||||
| -rw-r--r-- | core/edit_cmd.zig | 2 | ||||
| -rw-r--r-- | core/fs.zig | 2 | ||||
| -rw-r--r-- | core/keys.zig | 2 | ||||
| -rw-r--r-- | core/look.zig | 4 | ||||
| -rw-r--r-- | core/mouse.zig | 2 | ||||
| -rw-r--r-- | core/ninep/addr.zig | 2 | ||||
| -rw-r--r-- | core/ninep/cols.zig | 2 | ||||
| -rw-r--r-- | core/ninep/ctl.zig | 2 | ||||
| -rw-r--r-- | core/ninep/events.zig | 2 | ||||
| -rw-r--r-- | core/ninep/harness.zig (renamed from core/ninep/testing.zig) | 0 | ||||
| -rw-r--r-- | core/ninep/pane.zig | 2 | ||||
| -rw-r--r-- | core/ninep/pty.zig | 2 | ||||
| -rw-r--r-- | core/ninep/screen.zig | 2 | ||||
| -rw-r--r-- | core/ninep/sources.zig | 2 | ||||
| -rw-r--r-- | core/ninep/tree.zig | 2 | ||||
| -rw-r--r-- | core/sam_edit.zig | 2 | ||||
| -rw-r--r-- | core/tape.zig | 2 | ||||
| -rw-r--r-- | docs/next-terminal.md | 2 | ||||
| -rw-r--r-- | docs/next-tests.md | 2 |
25 files changed, 29 insertions, 29 deletions
diff --git a/core/Addon.zig b/core/Addon.zig index ec2f796a..0b60ca9c 100644 --- a/core/Addon.zig +++ b/core/Addon.zig @@ -911,7 +911,7 @@ test "addon reload gives migration the old record version and saves the new vers return if (version == 1 and n == 1 and bytes[0] == 7) Kind.c.PA_OK else 1; } }; - const p = try @import("ninep/testing.zig").withFile(std.testing.allocator, "x\n"); + const p = try @import("ninep/harness.zig").withFile(std.testing.allocator, "x\n"); defer p.deinit(); var old = std.mem.zeroInit(Kind.Ops, .{ .head = std.mem.zeroInit(Kind.c.pa_head, .{ .size = @sizeOf(Kind.c.pa_head), .abi = Kind.abi, .version = 1 }), .open = Fake.open, .paint = Fake.paint, .dump = Fake.save, .load = Fake.load }); @memcpy(old.head.name[0..7], "migrate"); diff --git a/core/Core.zig b/core/Core.zig index e9f4f0e4..b109b073 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -2945,7 +2945,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe // A body's click written back to event is done as the click: sent. A // line written to exec came back as F and runs as the command it was. { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const event = ctlfs.Node.of(file.serial, .event); const h = th.call(p, .{ .tag = 1, .op = .open, .node = event }).reply.handle; defer _ = th.call(p, .{ .tag = 2, .op = .release, .node = event, .handle = h }); @@ -3039,7 +3039,7 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe try std.testing.expect(Sent.len[1] == 0 and file.prompt == .none); // The question is in the log, and a script answers it on the ctl. { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); _ = exec.executeFrom(p, 0, "print(5)", true); var want: [32]u8 = undefined; try std.testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "ask {d} repl a b\n", .{file.serial}))); @@ -3541,7 +3541,7 @@ test "Tab N draws every pane's tab N cells wide and clicks count past it; bare T try std.testing.expect(p.executeBuiltinLine(0, "Tab 0")); try std.testing.expectEqual(@as(u16, 8), p.settings.tab); // The ctl read's tab column, and a Dump's settings. - const ctl_text = @import("ninep/testing.zig").rd(p, ctlfs.Node.of(pane.serial, .ctl), 0, 4096).bytes; + const ctl_text = @import("ninep/harness.zig").rd(p, ctlfs.Node.of(pane.serial, .ctl), 0, 4096).bytes; try std.testing.expect(std.mem.indexOf(u8, ctl_text, " 8 ") != null); try dump.dumpState(p); const restored = try dump.restore(p, p.dump_out.?, "/tmp/pardes.dump.zon"); diff --git a/core/Dir.zig b/core/Dir.zig index a82887fb..29c5cdc8 100644 --- a/core/Dir.zig +++ b/core/Dir.zig @@ -430,7 +430,7 @@ test "an exec in a directory pane runs in its directory, and its +Errors goes th } test "over 9P a directory pane is a text pane whose name ends in /, its body the listing, ctl's isdir 1, and get reads it again" { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const tree = @import("ninep/tree.zig"); var tmp = testing.tmpDir(.{}); defer tmp.cleanup(); diff --git a/core/Effect.zig b/core/Effect.zig index 7166294f..7475cc84 100644 --- a/core/Effect.zig +++ b/core/Effect.zig @@ -681,7 +681,7 @@ test "a save path that names no file is refused before anything is rewritten" { } test "a Save the host could not do logs no save record" { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const p = try th.withFile(std.testing.allocator, "x\n"); defer p.deinit(); const Failing = struct { diff --git a/core/Query.zig b/core/Query.zig index dacc11a1..b76a5aa4 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -2754,6 +2754,6 @@ test "a query row's address reaches every way a look arrives: an empty look writ // the whole row written to the pane's look: the place a.body.cur_row = 0; const tree = @import("ninep/tree.zig"); - try std.testing.expectEqual(tree.Status.ok, @import("ninep/testing.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status); + try std.testing.expectEqual(tree.Status.ok, @import("ninep/harness.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status); try std.testing.expectEqual(@as(i32, 3), a.body.cur_row); } diff --git a/core/dump.zig b/core/dump.zig index 1616f557..35975a9b 100644 --- a/core/dump.zig +++ b/core/dump.zig @@ -985,7 +985,7 @@ test "a session with every column it may hold dumps and restores them all" { } test "a restored session's column and workspace tags take more than one selection, and its 9P files have a time" { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const gpa = std.testing.allocator; const p = try Pardes.init(gpa, .{ .tty_only = true }); defer p.deinit(); @@ -1037,7 +1037,7 @@ test "a pane restored with unsaved text is asked about by Exit, Restore, Del and const id = for (restored.panes, 0..) |slot, i| { if (slot) |candidate| if (candidate.file != null and candidate.file.?.output == null) break i; } else return error.FileLost; - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const node = if (word == .Del or word == .get) ctlfs.Node.of(restored.panes[id].?.serial, .ctl) else @@ -1171,7 +1171,7 @@ test "a session's byte dump read by name, field by field as another build reads test "an old dump's file, a byte dump, is read by -l and by a Restore of its path, for one release" { const gpa = std.testing.allocator; - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const p = try Pardes.init(gpa, .{ .tty_only = true }); defer p.deinit(); _ = try p.setTestFile("kept in a .dump\n"); diff --git a/core/edit_cmd.zig b/core/edit_cmd.zig index 43006503..9f1f7862 100644 --- a/core/edit_cmd.zig +++ b/core/edit_cmd.zig @@ -452,7 +452,7 @@ fn commit(p: *Pardes, pd: *Pending, outputs: []const []const u8) void { } const testing = std.testing; -const th = @import("ninep/testing.zig"); +const th = @import("ninep/harness.zig"); const tree = @import("ninep/tree.zig"); /// The answer of the Edit waiting on its commands: as a host's worker diff --git a/core/fs.zig b/core/fs.zig index 0a10825d..0797beb0 100644 --- a/core/fs.zig +++ b/core/fs.zig @@ -11,7 +11,7 @@ const modal = @import("modal.zig"); const look = @import("look.zig"); pub const tree = @import("ninep/tree.zig"); const sources_fs = @import("ninep/sources.zig"); -const th = @import("ninep/testing.zig"); +const th = @import("ninep/harness.zig"); const Pardes = pardes.Pardes; const MAX_PANES = pardes.MAX_PANES; diff --git a/core/keys.zig b/core/keys.zig index 92e78b0e..72e3bb3b 100644 --- a/core/keys.zig +++ b/core/keys.zig @@ -632,7 +632,7 @@ test "Del from a key asks which neighbour takes the rows; nothing else asks" { p.newScratchBelow(foot); const tail = p.view().active; { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const asked = foot; p.view().active = asked; p.sync(); diff --git a/core/look.zig b/core/look.zig index f7084079..1023a532 100644 --- a/core/look.zig +++ b/core/look.zig @@ -2302,7 +2302,7 @@ test "every entry point to Look takes one expansion: a diff line and a file:12:5 var fx: DiffFixture = undefined; try fx.init(true, &.{.{ "src/x.zig", numbered }}, diff_text); defer fx.tmp.cleanup(); - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); // `column` -1: wherever a click puts it, every other way the same. const Case = struct { text: []const u8, name: []const u8, row: u16, col: u16, sweep: [2]u16, line: i32, column: i32 }; const cases = [_]Case{ @@ -2391,7 +2391,7 @@ test "a tag word looked at by a click and by Enter is one record to an event rea var fx: DiffFixture = undefined; try fx.init(true, &.{.{ "src/x.zig", "line one\n" }}, diff_text); defer fx.tmp.cleanup(); - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 30 }); defer p.deinit(); const pane = try fx.open(p, diff_text); diff --git a/core/mouse.zig b/core/mouse.zig index 3d7c5af9..cefc0335 100644 --- a/core/mouse.zig +++ b/core/mouse.zig @@ -1497,7 +1497,7 @@ test "mouse thumb buttons navigate once and clear selection gestures" { } test "a chorded exec an event reader holds is told with its argument, and written back runs with it" { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const p = try th.withFile(std.testing.allocator, "Msg said\narg-text\n"); defer p.deinit(); const serial = p.panes[0].?.serial; diff --git a/core/ninep/addr.zig b/core/ninep/addr.zig index 72a2d815..fd343363 100644 --- a/core/ninep/addr.zig +++ b/core/ninep/addr.zig @@ -319,7 +319,7 @@ pub const Addr = struct { }; const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const tree = @import("tree.zig"); const Node = tree.Node; const E = tree.E; diff --git a/core/ninep/cols.zig b/core/ninep/cols.zig index 561a5ffa..88d8ef88 100644 --- a/core/ninep/cols.zig +++ b/core/ninep/cols.zig @@ -241,7 +241,7 @@ pub fn remove(p: *Pardes, req: Req, serial: u32, file: tree.ColFile) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const Node = tree.Node; test "New written to a column's exec makes its scratch in the session's directory, as tagexec's does" { diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig index 72b18c88..7b4e2754 100644 --- a/core/ninep/ctl.zig +++ b/core/ninep/ctl.zig @@ -1323,7 +1323,7 @@ pub fn get(p: *Pardes, pane: *Pane) GetError!void { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; diff --git a/core/ninep/events.zig b/core/ninep/events.zig index 93a1187a..1951a434 100644 --- a/core/ninep/events.zig +++ b/core/ninep/events.zig @@ -828,7 +828,7 @@ pub fn writeEvent(p: *Pardes, asked: Req, id: usize) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; diff --git a/core/ninep/testing.zig b/core/ninep/harness.zig index cf75d80d..cf75d80d 100644 --- a/core/ninep/testing.zig +++ b/core/ninep/harness.zig diff --git a/core/ninep/pane.zig b/core/ninep/pane.zig index 8be26602..1d514a3c 100644 --- a/core/ninep/pane.zig +++ b/core/ninep/pane.zig @@ -1031,7 +1031,7 @@ pub fn truncate(p: *Pardes, pane: *Pane, file: PaneFile) tree.Status { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const call = th.call; const rd = th.rd; const wr = th.wr; diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig index 6f3a8af0..26bb7661 100644 --- a/core/ninep/pty.zig +++ b/core/ninep/pty.zig @@ -469,7 +469,7 @@ pub fn writeData(p: *Pardes, req: Req, id: usize) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const events = @import("events.zig"); const call = th.call; const rd = th.rd; diff --git a/core/ninep/screen.zig b/core/ninep/screen.zig index 1e2791b1..1e31bac0 100644 --- a/core/ninep/screen.zig +++ b/core/ninep/screen.zig @@ -83,7 +83,7 @@ pub fn listenersText(p: *Pardes) std.Io.Writer.Error![]const u8 { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const fs = @import("../fs.zig"); const call = th.call; const rd = th.rd; diff --git a/core/ninep/sources.zig b/core/ninep/sources.zig index 1d804e31..540506d4 100644 --- a/core/ninep/sources.zig +++ b/core/ninep/sources.zig @@ -109,7 +109,7 @@ pub fn handle(p: *Pardes, req: Req) Reply { } const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const limits = @import("../memory.zig").limits; test "embedded sources appear under the root only when the build carries them" { diff --git a/core/ninep/tree.zig b/core/ninep/tree.zig index d5a6b2fe..46a4e3d2 100644 --- a/core/ninep/tree.zig +++ b/core/ninep/tree.zig @@ -1504,7 +1504,7 @@ fn writeSend(p: *Pardes, req: Req) Reply { // ---- tests ---- const testing = std.testing; -const th = @import("testing.zig"); +const th = @import("harness.zig"); const config = @import("../config.zig"); const call = th.call; const rd = th.rd; diff --git a/core/sam_edit.zig b/core/sam_edit.zig index 0f4a70ba..700c2c01 100644 --- a/core/sam_edit.zig +++ b/core/sam_edit.zig @@ -1158,7 +1158,7 @@ fn expectEdit(text: []const u8, command: []const u8, want: []const u8) !void { } test "an x over 100k lines is 100k searches, each with its own step budget" { - const th = @import("ninep/testing.zig"); + const th = @import("ninep/harness.zig"); const line = &@as([80]u8, @splat('x')) ++ "\n"; const text = try std.testing.allocator.alloc(u8, line.len * 100_000); defer std.testing.allocator.free(text); diff --git a/core/tape.zig b/core/tape.zig index 00486666..5ba999bf 100644 --- a/core/tape.zig +++ b/core/tape.zig @@ -1777,7 +1777,7 @@ test "every place that sets the global tape aside sets the core's field aside: a test "a client's frame drawn between its steps records nothing into its idle tape" { const gpa = std.testing.allocator; - const p = try @import("ninep/testing.zig").withFile(gpa, "x\n"); + const p = try @import("ninep/harness.zig").withFile(gpa, "x\n"); defer p.deinit(); const bytes = try pardes.dump.dumpBytes(p); defer p.gpa.free(bytes); diff --git a/docs/next-terminal.md b/docs/next-terminal.md index 26996897..2d033380 100644 --- a/docs/next-terminal.md +++ b/docs/next-terminal.md @@ -230,7 +230,7 @@ What differs from the plan above, and why: of them fail for want of a terminal (they open a shell or a command pane, read the emulator, or index the classic boot's three shells) and say so on their first line (`if (pardes.Term.ops == null) return - error.SkipZigTest; // a shell`), and ninep/testing.zig's `withTerm` + error.SkipZigTest; // a shell`), and ninep/harness.zig's `withTerm` once for its 29. The rest run. core-test: 810 of 949 run, 139 skip; `shell-test` runs all of them with the terminal. The 28 tests that read terminal.zig's own state through a core are in test/terminal.zig diff --git a/docs/next-tests.md b/docs/next-tests.md index 2266b06a..7da60470 100644 --- a/docs/next-tests.md +++ b/docs/next-tests.md @@ -13,7 +13,7 @@ agent's survey. The `e2e` line (kbdin, mousein) is its first step. `mousein`), the process (flags, daemon, attach, signals, terminal bytes), and files on disk and effects. A rewrite that keeps those keeps its tests. - **T1, in-process 9P, is the main tier.** The core is driven only through - `serveFs` (core/ninep/testing.zig's `call`, `rd`, `wr`): as behavioural + `serveFs` (core/ninep/harness.zig's `call`, `rd`, `wr`): as behavioural as a client on a socket, and milliseconds a case. - **One process runner, not Python (the user, 2026-11-04):** test/process.zig's `Process` starts `pardes` detached (over its socket), in a pty, or as the |
