Skip to content

Commit fb637bc

Browse files
committed
Relax backtrace nest levels
1 parent 4720b12 commit fb637bc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/irb/test_context.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ def test_eval_input_with_exception
462462
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
463463
expected = [
464464
:*, /Traceback \(most recent call last\):\n/,
465-
:*, /\t... 8 levels...\n/,
466465
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
467466
:*, /\t 1: from \(irb\):1:in `hoge'\n/,
468467
:*, /\(irb\):1:in `fuga': unhandled exception\n/,
@@ -472,7 +471,7 @@ def test_eval_input_with_exception
472471
:*, /\(irb\):1:in `fuga': unhandled exception\n/,
473472
:*, /\tfrom \(irb\):1:in `hoge'\n/,
474473
:*, /\tfrom \(irb\):1:in `<main>'\n/,
475-
:*, /\t... 8 levels...\n/,
474+
:*
476475
]
477476
end
478477
assert_pattern_list(expected, out)
@@ -494,7 +493,6 @@ def test_eval_input_with_invalid_byte_sequence_exception
494493
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
495494
expected = [
496495
:*, /Traceback \(most recent call last\):\n/,
497-
:*, /\t... 8 levels...\n/,
498496
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
499497
:*, /\t 1: from \(irb\):1:in `hoge'\n/,
500498
:*, /\(irb\):1:in `fuga': A\\xF3B \(RuntimeError\)\n/,
@@ -504,7 +502,7 @@ def test_eval_input_with_invalid_byte_sequence_exception
504502
:*, /\(irb\):1:in `fuga': A\\xF3B \(RuntimeError\)\n/,
505503
:*, /\tfrom \(irb\):1:in `hoge'\n/,
506504
:*, /\tfrom \(irb\):1:in `<main>'\n/,
507-
:*, /\t... 8 levels...\n/,
505+
:*
508506
]
509507
end
510508
assert_pattern_list(expected, out)
@@ -532,7 +530,7 @@ def test_eval_input_with_long_exception
532530
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
533531
expected = [
534532
:*, /Traceback \(most recent call last\):\n/,
535-
:*, /\t... 27 levels...\n/,
533+
:*, /\t... \d+ levels...\n/,
536534
:*, /\t16: from \(irb\):1:in `a4'\n/,
537535
:*, /\t15: from \(irb\):1:in `a5'\n/,
538536
:*, /\t14: from \(irb\):1:in `a6'\n/,
@@ -570,7 +568,7 @@ def test_eval_input_with_long_exception
570568
:*, /\tfrom \(irb\):1:in `a6'\n/,
571569
:*, /\tfrom \(irb\):1:in `a5'\n/,
572570
:*, /\tfrom \(irb\):1:in `a4'\n/,
573-
:*, /\t... 27 levels...\n/,
571+
:*, /\t... \d+ levels...\n/,
574572
]
575573
end
576574
assert_pattern_list(expected, out)

0 commit comments

Comments
 (0)