Skip to content

Commit e467661

Browse files
authored
tweak test for calling unknown libraries in --output-o mode (#34096)
1 parent ad6752b commit e467661

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/ccall.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,11 @@ end
15381538

15391539
# issue #34061
15401540
o_file = tempname()
1541-
run(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
1541+
output = read(Cmd(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
15421542
f() = ccall((:dne, :does_not_exist), Cvoid, ());
1543-
precompile(f, ())'`)
1544-
@test isfile(o_file)
1543+
f()'`; ignorestatus=true), String)
1544+
@test occursin(output, """
1545+
ERROR: could not load library "does_not_exist"
1546+
does_not_exist.so: cannot open shared object file: No such file or directory
1547+
""")
1548+
@test !isfile(o_file)

0 commit comments

Comments
 (0)