From c49e17975496ccb757f4cbcead4afa0240b24ec2 Mon Sep 17 00:00:00 2001 From: Florian Atteneder Date: Mon, 22 Apr 2024 22:04:41 +0200 Subject: [PATCH] update tests to work with SystemError again --- test/loading.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/loading.jl b/test/loading.jl index 539ac619133dc9..a3726272d0eace 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -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, "@") @@ -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) @@ -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