This PR significantly improves the test coverage of the language server, providing at least a single basic test for every request that is used by the client. It also implements infrastructure for testing all of these requests, e.g. the ability to run interactive tests in a project context and refactors the interactive test runner to be more maintainable. Finally, it also fixes a small bug with the recently implemented unknown identifier code actions for auto-implicits (#10442) that was discovered in testing, where the "import all unambiguous unknown identifiers" code action didn't work correctly on auto-implicit identifiers.
108 lines
2.7 KiB
Text
108 lines
2.7 KiB
Text
{"textDocument": {"uri": "file:///completionFallback.lean"},
|
|
"position": {"line": 14, "character": 14}}
|
|
{"items":
|
|
[{"label": "up",
|
|
"kind": 4,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 14, 14, 0, "cDirection.up"]},
|
|
{"label": "noConfusionType",
|
|
"kind": 3,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»",
|
|
14,
|
|
14,
|
|
0,
|
|
"cDirection.noConfusionType"]},
|
|
{"label": "left",
|
|
"kind": 4,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»",
|
|
14,
|
|
14,
|
|
0,
|
|
"cDirection.left"]},
|
|
{"label": "down",
|
|
"kind": 4,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»",
|
|
14,
|
|
14,
|
|
0,
|
|
"cDirection.down"]},
|
|
{"label": "right",
|
|
"kind": 4,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»",
|
|
14,
|
|
14,
|
|
0,
|
|
"cDirection.right"]}],
|
|
"isIncomplete": true}
|
|
Resolution of up:
|
|
{"label": "up",
|
|
"kind": 4,
|
|
"detail": "Direction",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 14, 14, 0, "cDirection.up"]}
|
|
Resolution of noConfusionType:
|
|
{"label": "noConfusionType",
|
|
"kind": 3,
|
|
"detail": "Sort v✝ → Direction → Direction → Sort v✝",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»",
|
|
14,
|
|
14,
|
|
0,
|
|
"cDirection.noConfusionType"]}
|
|
Resolution of left:
|
|
{"label": "left",
|
|
"kind": 4,
|
|
"detail": "Direction",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 14, 14, 0, "cDirection.left"]}
|
|
Resolution of down:
|
|
{"label": "down",
|
|
"kind": 4,
|
|
"detail": "Direction",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 14, 14, 0, "cDirection.down"]}
|
|
Resolution of right:
|
|
{"label": "right",
|
|
"kind": 4,
|
|
"detail": "Direction",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 14, 14, 0, "cDirection.right"]}
|
|
{"textDocument": {"uri": "file:///completionFallback.lean"},
|
|
"position": {"line": 28, "character": 30}}
|
|
{"items":
|
|
[{"label": "mk",
|
|
"kind": 4,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.mk"]},
|
|
{"label": "ha",
|
|
"kind": 23,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.ha"]},
|
|
{"label": "hb",
|
|
"kind": 23,
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.hb"]}],
|
|
"isIncomplete": false}
|
|
Resolution of mk:
|
|
{"label": "mk",
|
|
"kind": 4,
|
|
"detail": "a → b → CustomAnd a b",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.mk"]}
|
|
Resolution of ha:
|
|
{"label": "ha",
|
|
"kind": 23,
|
|
"detail": "CustomAnd a b → a",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.ha"]}
|
|
Resolution of hb:
|
|
{"label": "hb",
|
|
"kind": 23,
|
|
"detail": "CustomAnd a b → b",
|
|
"data":
|
|
["«external:file:///completionFallback.lean»", 28, 30, 0, "cCustomAnd.hb"]}
|