lean4-htt/tests/lean/interactive/errorExplanationInteractive.lean.expected.out
Marc Huisinga dfd3d18530
test: improve language server test coverage (#10574)
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.
2025-09-30 11:15:03 +00:00

296 lines
10 KiB
Text

{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 28, "character": 30}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]},
{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.bar",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.bar",
"kind": 10,
"documentation": {"value": "(error) Error 0", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]},
{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]}],
"isIncomplete": false}
Resolution of testPkg.foo2:
{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]}
Resolution of testPkg.bar:
{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.bar",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.bar",
"kind": 10,
"documentation": {"value": "(error) Error 0", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]}
Resolution of testPkg.foo1:
{"textEdit":
{"replace":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 28, "character": 23},
"end": {"line": 28, "character": 30}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 28, 30, 0]}
{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 30, "character": 31}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]},
{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.bar",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.bar",
"kind": 10,
"documentation": {"value": "(error) Error 0", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]},
{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]}],
"isIncomplete": false}
Resolution of testPkg.foo2:
{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]}
Resolution of testPkg.bar:
{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.bar",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.bar",
"kind": 10,
"documentation": {"value": "(error) Error 0", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]}
Resolution of testPkg.foo1:
{"textEdit":
{"replace":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 30, "character": 23},
"end": {"line": 30, "character": 31}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 30, 31, 0]}
{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 32, "character": 32}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 32, 32, 0]},
{"textEdit":
{"replace":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 32, 32, 0]}],
"isIncomplete": false}
Resolution of testPkg.foo2:
{"textEdit":
{"replace":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 32, 32, 0]}
Resolution of testPkg.foo1:
{"textEdit":
{"replace":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 32, "character": 23},
"end": {"line": 32, "character": 32}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 32, 32, 0]}
{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 34, "character": 32}}
{"items":
[{"textEdit":
{"replace":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 34, 32, 0]},
{"textEdit":
{"replace":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 34, 32, 0]}],
"isIncomplete": false}
Resolution of testPkg.foo2:
{"textEdit":
{"replace":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}},
"newText": "testPkg.foo2",
"insert":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}}},
"label": "testPkg.foo2",
"kind": 10,
"documentation": {"value": "(error) Error 2", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 34, 32, 0]}
Resolution of testPkg.foo1:
{"textEdit":
{"replace":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}},
"newText": "testPkg.foo1",
"insert":
{"start": {"line": 34, "character": 23},
"end": {"line": 34, "character": 32}}},
"label": "testPkg.foo1",
"kind": 10,
"documentation": {"value": "(error) Error 1", "kind": "markdown"},
"detail": "error name",
"data": ["«external:file:///errorExplanationInteractive.lean»", 34, 32, 0]}
{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 37, "character": 31}}
{"range":
{"start": {"line": 37, "character": 23}, "end": {"line": 37, "character": 35}},
"contents": {"value": "(error) Error 2", "kind": "markdown"}}
{"textDocument": {"uri": "file:///errorExplanationInteractive.lean"},
"position": {"line": 39, "character": 31}}
{"range":
{"start": {"line": 39, "character": 23}, "end": {"line": 39, "character": 35}},
"contents": {"value": "(error) Error 2", "kind": "markdown"}}