Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 8, 2023
1 parent 9b31814 commit 14002c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct PkgError <: Exception
end
pkgerror(msg::String...) = throw(PkgError(join(msg)))
Base.showerror(io::IO, err::PkgError) = print(io, err.msg)
Base.show(io::IO, err::PkgError) = print(io, err.msg)
Base.show(io::IO, err::PkgError) = print(io, "PkgError: ", err.msg)


###############
Expand Down
2 changes: 1 addition & 1 deletion test/pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ end

@testset "PkgError printing" begin
err = PkgError("foobar")
@test occursin("PkgError(\"foobar\")", sprint(show, err))
@test occursin("PkgError: foobar", sprint(show, err))
@test sprint(showerror, err) == "foobar"
end

Expand Down

0 comments on commit 14002c4

Please sign in to comment.