summaryrefslogtreecommitdiff
path: root/src/Query.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:44:26 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:44:26 -0300
commite179cc44fe5060c76a5b00c41e53f11209f5acd9 (patch)
treeb8a1d5fa276a82c168b007df11cccc2676ea729b /src/Query.zig
parent5949dc4d7ec41116e5fd6fc86fced81b2f2de78e (diff)
downloadpardes-e179cc44fe5060c76a5b00c41e53f11209f5acd9.tar.gz
pardes-e179cc44fe5060c76a5b00c41e53f11209f5acd9.zip
Repair macOS validation after the upstream update
Keep cross-platform documentation metadata alive only during its owning test, and recognize leaders from the other platform's published builtin lists. Use canonical filesystem paths on Darwin, keep the procfs permission assertion Linux-specific, and set the scene's level through the current API.
Diffstat (limited to 'src/Query.zig')
-rw-r--r--src/Query.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Query.zig b/src/Query.zig
index 09b46f3b..55d7b0b5 100644
--- a/src/Query.zig
+++ b/src/Query.zig
@@ -2762,7 +2762,7 @@ test "a query row's place is its text: the match tinted after it, B3 on it opens
File.setContent(p, &sp.file.?, try p.gpa.dupe(u8, saved));
try std.testing.expect(sp.query == null and sp.file.?.location_rows.len == 0);
const at = std.mem.indexOf(u8, saved, "a.txt:2:5").?;
- const line = saved[at .. std.mem.indexOfScalarPos(u8, saved, at, '\n').?];
+ const line = saved[at..std.mem.indexOfScalarPos(u8, saved, at, '\n').?];
const word = look.expandedWord(line, 3).?;
a.body.cur_row = 0;
look.lookAt(p, sid, line[word.lo..word.hi]);
@@ -2849,7 +2849,9 @@ test "a row's address is the shortest path a Look from the query pane resolves:
// Looked at from the pane: the row's file, at its line
var realbuf: [4096]u8 = undefined;
const t = look.resolve(p, addr, dir, &realbuf);
- try std.testing.expectEqualStrings(row.path, t.file.path);
+ var expected_buf: [4096]u8 = undefined;
+ const expected = expected_buf[0..try std.Io.Dir.cwd().realPathFile(std.testing.io, row.path, &expected_buf)];
+ try std.testing.expectEqualStrings(expected, t.file.path);
try std.testing.expectEqual(row.at.line, t.file.at.line);
}
for ([_][]const u8{ "here.txt:2:1", "sub/deep.txt:2:1", "../up.txt:2:1", far ++ ":1:1" }) |want| {