[ruby/irb] Omit 2 encoding error related tests for TruffleRuby

(https://github.com/ruby/irb/pull/854)

They're failing due to an issue in Prism: https://github.com/ruby/prism/issues/2129

So we need to skip them until:
- The issue is fixed in Prism
- TruffleRuby is updated to a version of Prism that includes the fix

https://github.com/ruby/irb/commit/bfafaa5fbc
This commit is contained in:
Stan Lo 2024-01-31 23:44:11 +00:00 коммит произвёл git
Родитель 9fdfdf4fca
Коммит 6a689e3323
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -39,6 +39,10 @@ module TestIRB
end
def test_evaluate_with_encoding_error_without_lineno
if RUBY_ENGINE == 'truffleruby'
omit "Remove me after https://github.com/ruby/prism/issues/2129 is addressed and adopted in TruffleRuby"
end
assert_raise_with_message(EncodingError, /invalid symbol/) {
@context.evaluate(%q[:"\xAE"], 1)
# The backtrace of this invalid encoding hash doesn't contain lineno.

Просмотреть файл

@ -221,6 +221,10 @@ module TestIRB
end
def assert_code_block_open(lines, expected, local_variables: [])
if RUBY_ENGINE == 'truffleruby'
omit "Remove me after https://github.com/ruby/prism/issues/2129 is addressed and adopted in TruffleRuby"
end
_indent_level, _continue, code_block_open = check_state(lines, local_variables: local_variables)
error_message = "Wrong result of code_block_open for:\n #{lines.join("\n")}"
assert_equal(expected, code_block_open, error_message)