mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-19 02:14:42 +00:00
fix: Extend Nix symbol ranges to avoid additional semicolon
Add _extend_nix_symbol_range_to_include_semicolon method to prevent double semicolons Add test_nix_symbol_replacement_no_double_semicolon to validate the fix
This commit is contained in:
1 parent
51b2b0cea8
commit
b0ae69e468
5 files changed
+1256
-958
No files matched your search
@@ -106,14 +106,14 @@ class TestNixLanguageServer:
|
||||
|
||||
assert refs is not None
|
||||
assert isinstance(refs, list)
|
||||
# nixd finds at least the inherit statement (line 66)
|
||||
# nixd finds at least the inherit statement (line 67)
|
||||
assert len(refs) >= 1, f"Should find at least 1 reference to makeGreeting, found {len(refs)}"
|
||||
|
||||
# Verify makeGreeting is referenced at expected locations
|
||||
if refs:
|
||||
ref_lines = sorted([ref["range"]["start"]["line"] for ref in refs])
|
||||
# Check if we found the inherit (line 66, 0-indexed: 65)
|
||||
assert 65 in ref_lines, f"Should find makeGreeting inherit at line 66, found at lines {[l+1 for l in ref_lines]}"
|
||||
# Check if we found the inherit (line 67, 0-indexed: 66)
|
||||
assert 66 in ref_lines, f"Should find makeGreeting inherit at line 67, found at lines {[l+1 for l in ref_lines]}"
|
||||
|
||||
@pytest.mark.parametrize("language_server", [Language.NIX], indirect=True)
|
||||
def test_hover_information(self, language_server: SolidLanguageServer) -> None:
|
||||
|
||||
Reference in new issue
Block a user