diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-03 17:38:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-03 17:49:14 -0300 |
| commit | f9e538742f149598e26d893732ba249fed6b5e14 (patch) | |
| tree | ef69eb76452321c635d5a6a5b6e7e6b64e91147e /test/behaviour/settings.zig | |
| parent | ccb668645e9afc3710b1a50903022367a800ff1b (diff) | |
| download | pardes-f9e538742f149598e26d893732ba249fed6b5e14.tar.gz pardes-f9e538742f149598e26d893732ba249fed6b5e14.zip | |
test: review of the core migration's tests: the Pet test takes its branch from the build's platform (pardes_config, imported into the behaviour module, its options alone), not from whether Pet was taken, so a terminal's view taking Pet now fails it; New's absence checked in a file pane's tag and a scratch's made by New, not only in 9P's +New twice; the emptied column's tag shown to have the keyboard (typed into); the pane's tag drawn on the row under a one-row column tag; each checked to fail against a break (Pet without in_window, New in the file pane's tag, an emptied column's focus given to the workspace tag)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/behaviour/settings.zig')
| -rw-r--r-- | test/behaviour/settings.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig index 59e6f7c3..e62539e4 100644 --- a/test/behaviour/settings.zig +++ b/test/behaviour/settings.zig @@ -5,7 +5,10 @@ const Session = @import("session").Session; test "settings: Pet is the window's: a terminal's view refuses it, from a pane and the root; a window takes only its pets" { var s = try Session.initFile(std.testing.allocator, "x\n"); defer s.deinit(); - if (try s.refused("/ctl", "Pet cat\n") == 0) { + // Which build, from its options, not from the answer: a terminal's view + // taking Pet must fail here, not pass as a window. + if (comptime @import("pardes_config").platform == .gui) { + try s.write("/ctl", "Pet cat\n"); // A window's: dog is no pet of its, and off is. try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "\nPet cat\n") != null); _ = try s.refused("/ctl", "Pet dog\n"); @@ -16,6 +19,7 @@ test "settings: Pet is the window's: a terminal's view refuses it, from a pane a try std.testing.expect(std.mem.indexOf(u8, try s.read("/ctl"), "\nPet off\n") != null); return; } + try std.testing.expectEqual(@as(u16, 22), try s.refused("/ctl", "Pet cat\n")); try std.testing.expect(std.mem.startsWith(u8, s.said, "Pet is GUI-only, invalid here")); try std.testing.expectEqual(@as(u16, 22), try s.refused(s.at("/pane/{d}/exec", .{try s.focused()}), "Pet cat\n")); try std.testing.expectEqualStrings("Pet is GUI-only, invalid here", s.said); |
