diff --git a/test/precompile.jl b/test/precompile.jl index baa68dc92d4bec..249152a4918635 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -1992,13 +1992,19 @@ precompile_test_harness("Issue #50538") do load_path end precompile_test_harness("Issue #52063") do load_path - write(joinpath(load_path, "I52063.jl"), - """ - module I52063 - include_dependency("i_do_not_exist.jl") - end - """) - @test_throws ArgumentError Base.compilecache(Base.PkgId("I50538")) + fname = joinpath(load_path, "i_do_not_exist.jl") + @test_throws ArgumentError include_dependency(fname) + touch(fname) + @test include_dependency(fname) === nothing + chmod(fname, 0x000) + @test_throws ArgumentError include_dependency(fname) + dir = mktempdir() do dir + @test include_dependency(dir) === nothing + chmod(dir, 0x000) + @test_throws ArgumentError include_dependency(dir) + dir + end + @test_throws ArgumentError include_dependency(dir) end empty!(Base.DEPOT_PATH)