Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.10: REPL: fix intermittent REPL test failure #53096

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ let s = "CompletionFoo.?([1,2,3], 2.0)"
c, r, res = test_complete(s)
@test !res
@test length(c) == 1
@test occursin("test(x::AbstractArray{T}, y) where T<:Real", c[1])
@test occursin("test(x::AbstractArray{T}, y) where T<:Real", only(c))
# In particular, this checks that test(args...) is not a valid completion
# since it is strictly less specific than test(x::AbstractArray{T}, y)
end
Expand Down Expand Up @@ -680,15 +680,15 @@ let s = "CompletionFoo.?(false, \"a\", 3, "
c, r, res = test_complete(s)
@test !res
@test length(c) == 2
@test occursin("test(args...)", c[1])
@test occursin("test11(a::Integer, b, c)", c[2])
@test any(s->occursin("test(args...)", s), c)
@test any(s->occursin("test11(a::Integer, b, c)", s), c)
end

let s = "CompletionFoo.?(false, \"a\", 3, "
c, r, res = test_complete_noshift(s)
@test !res
@test length(c) == 1
@test occursin("test11(a::Integer, b, c)", c[1])
@test occursin("test11(a::Integer, b, c)", only(c))
end

let s = "CompletionFoo.?(\"a\", 3, "
Expand All @@ -711,7 +711,7 @@ let s = "CompletionFoo.?()"
c, r, res = test_complete_noshift(s)
@test !res
@test length(c) == 1
@test occursin("test10(s::String...)", c[1])
@test occursin("test10(s::String...)", only(c))
end

#= TODO: restrict the number of completions when a semicolon is present in ".?(" syntax
Expand Down