Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error message assertions for Ruby 3.4 #874

Merged
merged 1 commit into from Feb 15, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Feb 15, 2024

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
Copy link
Member Author

st0012 commented Feb 15, 2024

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

@tompng
Copy link
Member

tompng commented Feb 15, 2024

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

@tompng tompng merged commit 9359d4b into master Feb 15, 2024
53 of 57 checks passed
@tompng tompng deleted the update-error-message-assertions branch February 15, 2024 17:09
@hsbt
Copy link
Member

hsbt commented Feb 16, 2024

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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants