diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 11:14:05 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-04 11:20:36 -0300 |
| commit | ee36e1d07d455aed8b3895e35329b1de4c21ab94 (patch) | |
| tree | f397e386517b696c9f60e98f21703402cd32d162 /src | |
| parent | 3c5cddb963c67df5df0ed0ec023d68e43ba26bd5 (diff) | |
| download | pardes-ee36e1d07d455aed8b3895e35329b1de4c21ab94.tar.gz pardes-ee36e1d07d455aed8b3895e35329b1de4c21ab94.zip | |
test: review of the ctl migration: the second LookWord list look checked refilled with beta's places (its +Search body's words.txt:1:7-10), not only the one +Search; a failing builtin's test again refuses Msg a\x01b on the root exec with its control-character reason, as the old test did; a look opening a spaced path checks the source's ctl undo flag still 0 (the old revision and undo_len checks; the first 60 bytes stopped at dirty); a name's own backslash doubled in /index and in /recent's closed row moved to test/behaviour/other_files.zig through a name write to a file named back\nslash, the old /index and /recent tests trimmed to their setCwd control bytes and newline (no 9P name holds one); each checked to fail against a break (events' backslash doubling skipped, the second look searching alpha again, both control-character checks letting \x01 through); ten of the migrated tests checked against the reviewer's own breaks (fitErr's end left mid-character, Tab taking 0, a deleted file's Back step not going on, Delete asking, recentKeeps keeping a non-local name, a 1 MiB line not discarding its tail, is a dir not EISDIR, an event range backwards taken, DEL let through both checks, a remembered place's column clamped past the line)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src')
| -rw-r--r-- | src/ninep/ctl.zig | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index ec7cb3bc..89549933 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2471,10 +2471,7 @@ test "/index shows a name as the log does: a newline in it is \\n, a control byt // Its tag never carries the raw newline either. const tag = rd(p, Node.of(serialOf(p), .tag), 0, 4096).bytes; try testing.expect(std.mem.indexOf(u8, tag, "/tmp/two\\nlines") != null); - // A backslash of the name's own is doubled: `\n` written in a name - // reads back unlike a newline. - p.setCwd(term, "/tmp/back\\nslash"); - try testing.expect(std.mem.indexOf(u8, rd(p, @backingInt(tree.TopFile.index), 0, 4096).bytes, "/tmp/back\\\\nslash") != null); + // A name's own backslash doubled is test/behaviour/other_files.zig's. } test "a column takes panes until their documented minimums fill it, not until none can be halved" { @@ -2525,9 +2522,11 @@ test "a new file saved shows in /recent, open, while it is" { test "/recent shows a name as /index does, a newline in it escaped" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); - p.recent.opened(p.recentGpa(), "/tmp/a\nb\\c"); + // A backslash doubled is test/behaviour/other_files.zig's; a 9P name + // write cannot hold a newline. + p.recent.opened(p.recentGpa(), "/tmp/a\nb"); const text = rd(p, @backingInt(tree.TopFile.recent), 0, 8192).bytes; - try testing.expect(std.mem.indexOf(u8, text, "closed /tmp/a\\nb\\\\c\n") != null); + try testing.expect(std.mem.indexOf(u8, text, "closed /tmp/a\\nb\n") != null); } test "size is monotonic: growing is never refused, and a size once taken is taken again" { |
