Skip to content

Commit debf504

Browse files
committed
chore: only test public completion annotation on 1.12
1 parent 75849fc commit debf504

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

test/requests/test_completions.jl

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -217,23 +217,25 @@ end
217217
@test any(i -> i.label == "xxx" && occursin("xxx::Bar = f.yyy", i.detail), items2)
218218
end
219219

220-
@testitem "completion public annotation" begin
221-
include("../test_shared_server.jl")
222-
223-
settestdoc("""
224-
module Foo
225-
public bar
226-
227-
"asd"
228-
function bar end
229-
end
230-
231-
Foo.ba
232-
""")
233-
items = completion_test(7, 6).items
234-
@test length(items) == 1
235-
item = only(items)
236-
@test item.label == "bar"
237-
@test item.labelDetails.detail == " (public)"
238-
@test occursin("function bar end", item.labelDetails.description)
220+
if VERSION >= v"1.12"
221+
@testitem "completion public annotation" begin
222+
include("../test_shared_server.jl")
223+
224+
settestdoc("""
225+
module Foo
226+
public bar
227+
228+
"asd"
229+
function bar end
230+
end
231+
232+
Foo.ba
233+
""")
234+
items = completion_test(7, 6).items
235+
@test length(items) == 1
236+
item = only(items)
237+
@test item.label == "bar"
238+
@test item.labelDetails.detail == " (public)"
239+
@test occursin("function bar end", item.labelDetails.description)
240+
end
239241
end

0 commit comments

Comments
 (0)