summaryrefslogtreecommitdiff
path: root/test/snapshots/lsprelpath.snap
diff options
context:
space:
mode:
Diffstat (limited to 'test/snapshots/lsprelpath.snap')
-rw-r--r--test/snapshots/lsprelpath.snap23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/snapshots/lsprelpath.snap b/test/snapshots/lsprelpath.snap
index 70ca3fdc..152a13a3 100644
--- a/test/snapshots/lsprelpath.snap
+++ b/test/snapshots/lsprelpath.snap
@@ -1,19 +1,18 @@
# What a language row SPELLS its path as, and that both spellings still LOOK.
#
-# A row is written relative to the directory of the file the query was asked
-# about (lsp.rel, fed from Req.root) when the answer lives UNDER that directory,
-# and keeps its full absolute path when it does not — a `gr` list was otherwise
+# A row spells its path the shortest way a Look from the query pane resolves
+# (Query.lookPath): relative to the pane's directory, `../` included, when that
+# is shorter than the absolute path, else absolute — a `gr` list was otherwise
# the same forty-character prefix repeated down the pane with the part you came
-# to read pushed off the right edge, and a path outside the tree has nothing
-# short to be called.
+# to read pushed off the right edge.
#
# A row in the SAME directory shortens to a bare basename; the two that a
-# prefix strip can actually get wrong are here, one app each, as `gr` rows
+# careless shortening can get wrong are here, one app each, as `gr` rows
# (the file headers of the asking text's query pane, line 1 `Refs`):
#
-# PARENT the enum is one level UP from the asking file, so nothing is
-# stripped and the row carries `/tmp/.../cwd/shade.zig`. This is
-# the case that must NOT become `../shade.zig`.
+# PARENT the enum is one level UP from the asking file, so the row
+# climbs: `../shade.zig`, shorter than `/tmp/.../cwd/shade.zig`,
+# and a Look from the pane still lands on it.
# SUBDIRECTORY the enum is one level DOWN, so the strip leaves a path with a
# separator still in it — `inner/tint.zig`, not `tint.zig`. A
# strip that took the basename instead would produce a row that
@@ -29,7 +28,7 @@ file shade.zig pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n
file sub/inner/tint.zig pub const Tint = enum {\n ochre,\n indigo,\n};\n
file sub/parent.zig const shade = @import("../shade.zig");\n\npub fn pick(s: shade.Shade) u8 {\n return switch (s) {\n \n };\n}\n
file sub/subdir.zig const tint = @import("inner/tint.zig");\n\npub fn hue(t: tint.Tint) u8 {\n return switch (t) {\n \n };\n}\n
-# ---- PARENT: outside the asking file's tree, so the row stays absolute ----
+# ---- PARENT: outside the asking file's tree, so the row climbs ----
start 35 100 sub/parent.zig
wait 8000 fn pick
stable 700 20000
@@ -39,8 +38,8 @@ stable 400 5000
key g
key r
# the query pane under parent.zig, line 1 `Refs`, the rows under each file:
-# shade.zig's spelled whole, its directory being above
-wait 15000 cwd/shade.zig
+# shade.zig's spelled from above, `../shade.zig`
+wait 15000 ../shade.zig:1
stable 700 15000
snap absrow
# the current row is parent.zig's own; the one before it is shade.zig's,