Skip to content

Commit e363056

Browse files
committed
test: add reference exclusion test for fixed format
1 parent 839b39a commit e363056

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/test_server_references.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,12 @@ def test_references():
5151
[free_path, 78, 6, 12],
5252
),
5353
)
54+
55+
56+
def test_references_ignore_comments_fixed():
57+
string = write_rpc_request(1, "initialize", {"rootPath": str(test_dir / "fixed")})
58+
file_path = test_dir / "fixed" / "comment_as_reference.f"
59+
string += ref_req(file_path, 3, 22)
60+
errcode, results = run_request(string)
61+
assert errcode == 0
62+
assert len(results[1]) == 2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
program comment_as_reference
2+
C Comment with variable name gets picked as a ref: variable_to_reference
3+
real variable_to_reference
4+
variable_to_reference = 1
5+
end program comment_as_reference

0 commit comments

Comments
 (0)