Skip to content

Update error message assertions for Ruby 3.4 - #874

Merged
tompng merged 1 commit into
masterfrom
update-error-message-assertions
Feb 15, 2024
Merged

tompng merged 1 commit into
masterfrom
update-error-message-assertions

Conversation

@st0012

@st0012 st0012 commented Feb 15, 2024 •

Copy link
Copy Markdown
Member

ruby/ruby#9605 changes both quotes and format for exception messages. So we need to update the assertions in the tests.

ruby/ruby#9605 changes both quotes and format for
exception messages. So we need to update the assertions in the tests.
@st0012
st0012 force-pushed the update-error-message-assertions branch from ea1bef6 to afd5f57 Compare February 15, 2024 13:32
@st0012 st0012 changed the title Relax assertions on error message related tests Update error message assertions for Ruby 3.4 Feb 15, 2024
@st0012

st0012 commented Feb 15, 2024

Copy link
Copy Markdown
Member Author

The failure is caused by the Ruby head builds still pulling the version from Feb 13th 🤔

@tompng

tompng commented Feb 15, 2024

Copy link
Copy Markdown
Member

Test is failing now, but it will going to pass within few day delay.

@tompng
tompng merged commit 9359d4b into master Feb 15, 2024
@tompng
tompng deleted the update-error-message-assertions branch February 15, 2024 17:09
@hsbt

hsbt commented Feb 16, 2024

Copy link
Copy Markdown
Member

This change is failed with ruby/ruby master.

[15/36] TestIRB::ContextTest#test_eval_input_with_exception = 0.00 s
  1) Failure:
TestIRB::ContextTest#test_eval_input_with_exception [/Users/hsbt/Documents/github.com/ruby/ruby/test/irb/test_context.rb:552]:
Expected /\tfrom \(irb\):1:in '<top \(required\)>'\n/
to match
  "\tfrom (irb):1:in '<main>'\n"+
  "\tfrom <internal:kernel>:191:in 'Kernel#loop'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"
after 5 patterns with 63 characters.

[18/36] TestIRB::ContextTest#test_eval_input_with_invalid_byte_sequence_exception = 0.00 s
  2) Failure:
TestIRB::ContextTest#test_eval_input_with_invalid_byte_sequence_exception [/Users/hsbt/Documents/github.com/ruby/ruby/test/irb/test_context.rb:591]:
Expected /\tfrom \(irb\):1:in '<top \(required\)>'\n/
to match
  "\tfrom (irb):1:in '<main>'\n"+
  "\tfrom <internal:kernel>:191:in 'Kernel#loop'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"
after 5 patterns with 65 characters.

[23/36] TestIRB::ContextTest#test_eval_input = 0.00 s
  3) Failure:
TestIRB::ContextTest#test_eval_input [/Users/hsbt/Documents/github.com/ruby/ruby/test/irb/test_context.rb:91]:
Expected /\(irb\):1:in '<top \(required\)>': Foo \(RuntimeError\)\n/
to match
  "(irb):1:in '<main>': Foo (RuntimeError)\n"+
  "\tfrom <internal:kernel>:191:in 'Kernel#loop'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "=> #<RuntimeError: Foo>\n"+
  "=> 0\n"+
  "=> 0\n"
after 1 patterns with 0 characters.

[34/36] TestIRB::ContextTest#test_eval_input_raise2x = 0.00 s
  4) Failure:
TestIRB::ContextTest#test_eval_input_raise2x [/Users/hsbt/Documents/github.com/ruby/ruby/test/irb/test_context.rb:121]:
Expected /\(irb\):1:in '<top \(required\)>': Foo \(RuntimeError\)\n/
to match
  "(irb):1:in '<main>': Foo (RuntimeError)\n"+
  "\tfrom <internal:kernel>:191:in 'Kernel#loop'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "(irb):2:in '<main>': Bar (RuntimeError)\n"+
  "\tfrom <internal:kernel>:191:in 'Kernel#loop'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "\tfrom <internal:array>:52:in 'Array#each'\n"+
  "=> #<RuntimeError: Bar>\n"
after 1 patterns with 0 characters.

matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 19, 2024
(ruby/irb#874)

#9605 changes both quotes and format for
exception messages. So we need to update the assertions in the tests.

ruby/irb@9359d4b51d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants