Skip to content

Commit

Permalink
Adjust tests for JuliaLang/julia#47077 (backport of #784) (#794)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e1b40c)
  • Loading branch information
martinholters authored Feb 18, 2023
1 parent 39690b0 commit 7463409
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ end
DivideError: integer division error
Stacktrace:.*
caused by: UndefVarError: __not_a_binding__ not defined
caused by: UndefVarError: `?__not_a_binding__`? not defined
Stacktrace:.*
"""s, sprint(show, excs_with_bts))

Expand All @@ -1174,23 +1174,23 @@ end
2-element ExceptionStack:
DivideError: integer division error
caused by: UndefVarError: __not_a_binding__ not defined"""s,
caused by: UndefVarError: `?__not_a_binding__`? not defined"""s,
sprint(show, excs_sans_bts))

# Check that the ExceptionStack with backtraces `display_error`s correctly:
@test occursin(r"""
ERROR: DivideError: integer division error
Stacktrace:.*
caused by: UndefVarError: __not_a_binding__ not defined
caused by: UndefVarError: `?__not_a_binding__`? not defined
Stacktrace:.*
"""s, sprint(Base.display_error, excs_with_bts))

# Check that the ExceptionStack without backtraces `display_error`s correctly:
@test occursin(r"""
ERROR: DivideError: integer division error
caused by: UndefVarError: __not_a_binding__ not defined"""s,
caused by: UndefVarError: `?__not_a_binding__`? not defined"""s,
sprint(Base.display_error, excs_sans_bts))
else
# Due to runtime limitations, julia-1.0 only retains the last exception.
Expand Down

0 comments on commit 7463409

Please sign in to comment.