Skip to content

Commit

Permalink
chore: fix tests for 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Apr 24, 2024
1 parent 1cc14a9 commit b2e1614
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/requests/test_completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ end
# String macros
settestdoc("uint12")
@test any(item.label == "uint128\"" for item in completion_test(0, 6).items)
@test any(item.label == "@uint128_str" for item in completion_test(0, 6).items)

settestdoc("@uint12")
@test any(item.label == "@uint128_str" for item in completion_test(0, 7).items)

settestdoc("""
macro foobar_str(ex) ex end
fooba
@fooba
""")
@test any(item.label == "foobar\"" for item in completion_test(1, 5).items)
@test any(item.label == "@foobar_str" for item in completion_test(1, 5).items)
@test any(item.label == "@foobar_str" for item in completion_test(2, 5).items)
end

@testitem "scope var completions" begin
Expand Down
7 changes: 5 additions & 2 deletions test/test_intellisense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using LanguageServer.URIs2

include("test_shared_server.jl")

testtext = """
module testmodule
struct testtype
Expand All @@ -28,7 +28,10 @@


res = LanguageServer.textDocument_hover_request(LanguageServer.TextDocumentPositionParams(LanguageServer.TextDocumentIdentifier(uri"untitled:testdoc"), LanguageServer.Position(3, 11)), server, nothing)
@test res.contents.value == string(LanguageServer.sanitize_docstring(StaticLint.CoreTypes.Float64.doc), "\n```julia\nCore.Float64 <: Core.AbstractFloat\n```")
@test occursin(
"```julia\nCore.Float64 <: Core.AbstractFloat\n```",
res.contents.value
)

res = LanguageServer.textDocument_hover_request(LanguageServer.TextDocumentPositionParams(LanguageServer.TextDocumentIdentifier(uri"untitled:testdoc"), LanguageServer.Position(7, 12)), server, nothing)
@test occursin(r"c::testtype", res.contents.value)
Expand Down

0 comments on commit b2e1614

Please sign in to comment.