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

Make tests more compatible with TruffleRuby #514

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Feb 3, 2023

  1. Some test cases don't fail on TruffleRuby anymore so we can remove the omit/pend conditions.
  2. Some test cases can work with TruffleRuby with small tweaks on the test subject/assertion.

By making more tests run against TruffleRuby, we can help it match CRuby's behaviour quicker (example: oracle/truffleruby#2848).

Thanks @nirvdrum for working with me on this. We'll have regular pairing sessions to remove the rest of the skipping conditions.

test/irb/test_context.rb Outdated Show resolved Hide resolved
st0012 and others added 3 commits February 9, 2023 15:20
The test input IRB currently uses happen to hit a compatibility bug in
TruffleRuby, which has been documented in
oracle/truffleruby#2848

Although it'll eventually be fixed, we can make the test case support TruffleRuby
now by tweaking it just a little bit.

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
The test case was added in d08ef68
to verify that IRB emits Ruby warning as expected.

But the subject it uses relies on CRuby's regexp engine, which isn't always
used in other language implementations, like TruffleRuby. That's why we
ended up skipping TruffleRuby in this test case.

Since the test isn't about regexp itself, we can change the testing subject
and just remove the special condition for TruffleRuby.

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
@st0012 st0012 merged commit 6fdf4f3 into master Feb 9, 2023
@st0012 st0012 deleted the remove-truffle-ruby-omit-1 branch February 9, 2023 15:33
matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 9, 2023
(ruby/irb#514)

* Improve encoding error test case

The test input IRB currently uses happen to hit a compatibility bug in
TruffleRuby, which has been documented in
oracle/truffleruby#2848

Although it'll eventually be fixed, we can make the test case support TruffleRuby
now by tweaking it just a little bit.

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>

* Remove redundant TruffleRuby omits/pends

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>

* Use a different way to test warning emission

The test case was added in ruby/irb@d08ef68
to verify that IRB emits Ruby warning as expected.

But the subject it uses relies on CRuby's regexp engine, which isn't always
used in other language implementations, like TruffleRuby. That's why we
ended up skipping TruffleRuby in this test case.

Since the test isn't about regexp itself, we can change the testing subject
and just remove the special condition for TruffleRuby.

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>

---------

ruby/irb@6fdf4f3e97

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
@st0012 st0012 mentioned this pull request Feb 16, 2023
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.

2 participants