summaryrefslogtreecommitdiff
path: root/src/ninep/testing.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:52:39 -0300
committerGabriel Schneider <[email protected]>2026-11-05 00:58:29 -0300
commit1c7fd4c48f61695f396765c2f273b560a2e19963 (patch)
tree4b76acd5b742fb2d7cf90dc3c03d6ac26dbbcf2a /src/ninep/testing.zig
parentf88ed53afea4fb38bf0b78ecbfbd49edab6c252b (diff)
downloadpardes-1c7fd4c48f61695f396765c2f273b560a2e19963.tar.gz
pardes-1c7fd4c48f61695f396765c2f273b560a2e19963.zip
ninep ctl: a control message's refusal is one refuseQuoting with a tail, so refuseTo and the column ctl's two hand-built refusals, each cut at its own length, go; a captured run's failure is one failedWrite, said three times before; get returns getRefused's words, already in ename, where it copied them out and back; a constant was formatted into a throwaway buffer; writeSettingsOf had no caller; the tests' no-op spawn host is testing.zig's starting, not four copies
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/ninep/testing.zig')
-rw-r--r--src/ninep/testing.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ninep/testing.zig b/src/ninep/testing.zig
index ec665130..14aeffea 100644
--- a/src/ninep/testing.zig
+++ b/src/ninep/testing.zig
@@ -148,6 +148,12 @@ pub fn nameAt(list: []const Dirent, want: []const u8) ?Dirent {
return null;
}
+/// A host that starts shells and does nothing else: the core alone starts
+/// none.
+pub const starting: pardes.Host.VTable = .{ .spawn = startNothing };
+
+fn startNothing(_: ?*anyopaque, _: u8, _: []const u8) void {}
+
pub const FakeTty = struct {
taken: bool,