Skip to content

Commit

Permalink
fix ccall test for not-found library output
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Aug 26, 2020
1 parent 5da9691 commit 829f92d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/ccall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1554,15 +1554,15 @@ let
end

# issue #34061
o_file = tempname()
output = read(Cmd(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
f() = ccall((:dne, :does_not_exist), Cvoid, ());
f()'`; ignorestatus=true), String)
@test occursin(output, """
ERROR: could not load library "does_not_exist"
does_not_exist.so: cannot open shared object file: No such file or directory
""")
@test !isfile(o_file)
let o_file = tempname(), err = Base.PipeEndpoint()
run(pipeline(Cmd(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio();
f() = ccall((:dne, :does_not_exist), Cvoid, ());
f()'`; ignorestatus=true), stderr=err), wait=false)
output = read(err, String)
@test occursin("""ERROR: could not load library "does_not_exist"
""", output)
@test !isfile(o_file)
end

# pass NTuple{N,T} as Ptr{T}/Ref{T}
let
Expand Down

0 comments on commit 829f92d

Please sign in to comment.