Skip to content

Commit

Permalink
update tests to work with SystemError again
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder committed Apr 22, 2024
1 parent b143c90 commit 80ac921
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,9 @@ end
# normalization of paths by include (#26424)
@test begin
exc = try; include("./notarealfile.jl"); "unexpectedly reached!"; catch exc; exc; end
@test exc isa ArgumentError
exc.msg
end == "including $(repr(joinpath(@__DIR__, "notarealfile.jl"))): No such file"
@test exc isa SystemError
exc.prefix
end == "including file $(repr(joinpath(@__DIR__, "notarealfile.jl"))): No such file"

old_act_proj = Base.ACTIVE_PROJECT[]
pushfirst!(LOAD_PATH, "@")
Expand Down Expand Up @@ -1542,7 +1542,7 @@ end
end

file = joinpath(depot, "dev", "non-existent.jl")
@test_throws ArgumentError("including $(repr(file)): No such file") include(file)
@test_throws SystemError("including file $(repr(file)): No such file") include(file)
touch(file)
@test include_dependency(file) === nothing
chmod(file, 0x000)
Expand All @@ -1552,7 +1552,7 @@ end
@test include_dependency(dir) === nothing
dir
end
@test_throws ArgumentError("including $(repr(dir)): No such file or directory") include_dependency(dir)
@test_throws SystemError("including $(repr(dir)): No such file or directory") include_dependency(dir)
end
end

Expand Down

0 comments on commit 80ac921

Please sign in to comment.