Skip to content

Commit

Permalink
Disable repeated stack frames tests on non-macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Feb 22, 2021
1 parent 89911f8 commit dced572
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions test/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -765,24 +765,26 @@ let err = nothing
end
end

single_repeater() = single_repeater()
pair_repeater_a() = pair_repeater_b()
pair_repeater_b() = pair_repeater_a()

@testset "repeated stack frames" begin
let bt = try single_repeater()
catch
catch_backtrace()
if Sys.isapple() # The "repeated stack frames" formatting currently only works on MacOS.
single_repeater() = single_repeater()
pair_repeater_a() = pair_repeater_b()
pair_repeater_b() = pair_repeater_a()

@testset "repeated stack frames" begin
let bt = try single_repeater()
catch
catch_backtrace()
end
bt_str = sprint(Base.show_backtrace, bt)
@test occursin(r"repeats \d+ times", bt_str)
end
bt_str = sprint(Base.show_backtrace, bt)
@test occursin(r"repeats \d+ times", bt_str)
end

let bt = try pair_repeater_a()
catch
catch_backtrace()
let bt = try pair_repeater_a()
catch
catch_backtrace()
end
bt_str = sprint(Base.show_backtrace, bt)
@test occursin(r"the last 2 lines are repeated \d+ more times", bt_str)
end
bt_str = sprint(Base.show_backtrace, bt)
@test occursin(r"the last 2 lines are repeated \d+ more times", bt_str)
end
end
end # Sys.isapple()

0 comments on commit dced572

Please sign in to comment.