Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Oct 17, 2024
1 parent f40596f commit e53bb76
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/mri/excludes/TestRegexp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
exclude :test_matchdata, "<42> expected but was <nil>."
exclude :test_named_capture, "<\"#<MatchData \\\"&amp; y\\\" foo:\\\"amp\\\" foo:\\\"y\\\">\"> expected but was <\"#<MatchData \\\"&amp; y\\\" foo:\\\"amp\\\" 2:\\\"y\\\">\">."
exclude :test_named_capture_nonascii, "IndexError expected but nothing was raised."
exclude :test_once_multithread, "TypeError: TruffleRuby doesn't have a case for the org.truffleruby.core.array.ArrayAppendOneNodeGen node with values of type Array(org.truffleruby.core.array.RubyArray)[org.truffleruby.core.array.library.SharedArrayStorage,1] org.truffleruby.core.regexp.RubyRegexp"
exclude :test_once_multithread, "transient(fails on CI): <[/1/, /1/]> expected but was <[/1/]>."
exclude :test_parse, "Polyglot::ForeignException: invalid group reference 80"
exclude :test_parse_kg, "Polyglot::ForeignException: undefined name <-1> reference"
exclude :test_posix_bracket, "expected: /duplicated range/"
Expand Down
9 changes: 4 additions & 5 deletions test/mri/failing.exclude
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Explicitly unsupported

ruby/test_ast.rb
ruby/test_ast.rb # tests RubyVM::InstructionSequence
ruby/test_compile_prism.rb # tests RubyVM::InstructionSequence
ruby/test_iseq.rb # tests RubyVM::InstructionSequence
ruby/test_mjit.rb
ruby/test_mjit_debug.rb
ruby/test_rubyvm.rb # tests RubyVM
dbm/test_dbm.rb
gdbm/test_gdbm.rb
test_pty.rb
Expand Down Expand Up @@ -75,8 +78,4 @@ dtrace/test_singleton_function.rb
dtrace/test_string.rb
misc/test_ruby_mode.rb
ruby/enc/test_windows_1251.rb
ruby/test_ast.rb # tests RubyVM::InstructionSequence
ruby/test_compile_prism.rb # tests RubyVM::InstructionSequence
ruby/test_iseq.rb # RubyVM
ruby/test_rubyvm.rb
ruby/test_bignum.rb # relies on Bignums on Fixnum range
10 changes: 10 additions & 0 deletions tool/parse_mri_errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,16 @@ def process_test_failures!(contents)
error_display = error_lines[index]

# Mismatched expectations span two lines. It's much more useful if they're combined into one message.
#
# FIXME: A line with "expected but was" may be prefixed with additional line, e.g.
# ```
# 1) Failure:
# Test_SPrintf#test_format_integer(% #-020.d) [/b/b/e/main/test/mri/tests/cext-ruby/test_printf.rb:153]:
# rb_sprintf("% #-020.d", 2147483647).
# <[" 2147483647 ", "% #-020.d"]> expected but was
# <[" 0000000002147483647", "% #-020.d"]>.
# ```
# In this case only the first line of the message is added to the result - 'rb_sprintf("% #-020.d", 2147483647).'
if error_display =~ /expected but was/
index += 1
error_display << ' ' + error_lines[index]
Expand Down

0 comments on commit e53bb76

Please sign in to comment.