Project

General

Profile

« Previous | Next » 

Revision 970e7cde

Added by st0012 (Stan Lo) almost 3 years ago

[ruby/irb] Make tests more compatible with TruffleRuby
(https://github.com/ruby/irb/pull/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
https://github.com/oracle/truffleruby/issues/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

  • Remove redundant TruffleRuby omits/pends

Co-authored-by: Kevin Menard

  • Use a different way to test warning emission

The test case was added in https://github.com/ruby/irb/commit/d08ef68d2dfbf041d363f65686d78a937954513c
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


https://github.com/ruby/irb/commit/6fdf4f3e97

Co-authored-by: Kevin Menard