summaryrefslogtreecommitdiff
path: root/test/lspfixture/dotcomplete.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-09 04:20:20 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit628aa40f13e9bbd313b51ab625f193110aad8dd0 (patch)
treee60902495e308505959361d8719c382401b88295 /test/lspfixture/dotcomplete.zig
parent0a15af8d98771180e32402e68ea844f9f377cefb (diff)
downloadpardes-628aa40f13e9bbd313b51ab625f193110aad8dd0.tar.gz
pardes-628aa40f13e9bbd313b51ab625f193110aad8dd0.zip
Tab after a dot in insert mode lists what could go there
Diffstat (limited to 'test/lspfixture/dotcomplete.zig')
-rw-r--r--test/lspfixture/dotcomplete.zig28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lspfixture/dotcomplete.zig b/test/lspfixture/dotcomplete.zig
new file mode 100644
index 00000000..484f6b86
--- /dev/null
+++ b/test/lspfixture/dotcomplete.zig
@@ -0,0 +1,28 @@
+//! A file caught MID-KEYSTROKE, for the lspbench completion probe. Like
+//! broken.zig it is NOT built and NOT imported by anything, and like broken.zig
+//! its defect is the point.
+//!
+//! `Tab` after a `.` is the one language query whose normal input does not
+//! parse: the user has typed the dot and nothing else, so `switch (s) { . }`
+//! loses the entire switch to the parser's error recovery and every ancestor
+//! an expected-type resolution needs goes with it. A probe pointed at a
+//! FINISHED `.member` would exercise the resolution and none of the repair,
+//! and would pass on a backend that cannot answer a real keypress at all.
+//!
+//! Nothing here comes from std, so what the probe checks does not encode this
+//! machine's stdlib. The member names are nonsense words on purpose: they
+//! appear on their DECLARATION lines and nowhere else, so a row containing one
+//! can only have come from the enum's definition and never from the switch the
+//! cursor is sitting in.
+pub const Shade = enum {
+ verdigris,
+ cinnabar,
+ orpiment,
+};
+
+pub fn pick(s: Shade) u8 {
+ return switch (s) {
+ .
+ };
+}
+