From 218d8577cbffb45a6ee80cea52418864a044e452 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 9 Aug 2026 09:43:51 -0300 Subject: lsp rows: paths relative to the asking file, and the completion text --- test/lspbench.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/lspbench.zig') diff --git a/test/lspbench.zig b/test/lspbench.zig index b294e60c..329e5743 100644 --- a/test/lspbench.zig +++ b/test/lspbench.zig @@ -108,8 +108,10 @@ const anchors = [_]Anchor{ // keypress looks like: the file does not parse and the switch is not in // the tree at all. `verdigris` appears only on the enum member's own // line, so a row carrying it came from the DEFINITION and not from the - // line the cursor sits on. - .{ .file = "test/lspfixture/dotcomplete.zig", .needle = "return switch (s) {\n .", .at = 29, .kind = .completion, .expect = "verdigris" }, + // line the cursor sits on — and it has to appear TWICE, because a + // completion row carries the candidate's own name (the word that would go + // after the dot) before the declaration line it was read off. + .{ .file = "test/lspfixture/dotcomplete.zig", .needle = "return switch (s) {\n .", .at = 29, .kind = .completion, .expect = "verdigris verdigris," }, // ...and the same dot on a line that is ALSO missing its terminator, // which is one parse error repaired or not. This is the probe that // catches a repair chosen by error count rather than by whether the dot -- cgit v1.3