Skip to content

Commit

Permalink
Relax backtrace nest levels
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 30, 2021
1 parent 4720b12 commit fb637bc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/irb/test_context.rb
Expand Up @@ -462,7 +462,6 @@ def test_eval_input_with_exception
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
expected = [
:*, /Traceback \(most recent call last\):\n/,
:*, /\t... 8 levels...\n/,
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
:*, /\t 1: from \(irb\):1:in `hoge'\n/,
:*, /\(irb\):1:in `fuga': unhandled exception\n/,
Expand All @@ -472,7 +471,7 @@ def test_eval_input_with_exception
:*, /\(irb\):1:in `fuga': unhandled exception\n/,
:*, /\tfrom \(irb\):1:in `hoge'\n/,
:*, /\tfrom \(irb\):1:in `<main>'\n/,
:*, /\t... 8 levels...\n/,
:*
]
end
assert_pattern_list(expected, out)
Expand All @@ -494,7 +493,6 @@ def test_eval_input_with_invalid_byte_sequence_exception
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
expected = [
:*, /Traceback \(most recent call last\):\n/,
:*, /\t... 8 levels...\n/,
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
:*, /\t 1: from \(irb\):1:in `hoge'\n/,
:*, /\(irb\):1:in `fuga': A\\xF3B \(RuntimeError\)\n/,
Expand All @@ -504,7 +502,7 @@ def test_eval_input_with_invalid_byte_sequence_exception
:*, /\(irb\):1:in `fuga': A\\xF3B \(RuntimeError\)\n/,
:*, /\tfrom \(irb\):1:in `hoge'\n/,
:*, /\tfrom \(irb\):1:in `<main>'\n/,
:*, /\t... 8 levels...\n/,
:*
]
end
assert_pattern_list(expected, out)
Expand Down Expand Up @@ -532,7 +530,7 @@ def test_eval_input_with_long_exception
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
expected = [
:*, /Traceback \(most recent call last\):\n/,
:*, /\t... 27 levels...\n/,
:*, /\t... \d+ levels...\n/,
:*, /\t16: from \(irb\):1:in `a4'\n/,
:*, /\t15: from \(irb\):1:in `a5'\n/,
:*, /\t14: from \(irb\):1:in `a6'\n/,
Expand Down Expand Up @@ -570,7 +568,7 @@ def test_eval_input_with_long_exception
:*, /\tfrom \(irb\):1:in `a6'\n/,
:*, /\tfrom \(irb\):1:in `a5'\n/,
:*, /\tfrom \(irb\):1:in `a4'\n/,
:*, /\t... 27 levels...\n/,
:*, /\t... \d+ levels...\n/,
]
end
assert_pattern_list(expected, out)
Expand Down

0 comments on commit fb637bc

Please sign in to comment.