Skip to content

Commit

Permalink
[ruby/irb] Omit 2 encoding error related tests for TruffleRuby
Browse files Browse the repository at this point in the history
(ruby/irb#854)

They're failing due to an issue in Prism: ruby/prism#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

ruby/irb@bfafaa5fbc
  • Loading branch information
st0012 authored and matzbot committed Jan 31, 2024
1 parent 9fdfdf4 commit 6a689e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/irb/test_context.rb
Expand Up @@ -39,6 +39,10 @@ def test_last_value
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.
Expand Down
4 changes: 4 additions & 0 deletions test/irb/test_ruby_lex.rb
Expand Up @@ -221,6 +221,10 @@ def assert_should_continue(lines, expected, local_variables: [])
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)
Expand Down

0 comments on commit 6a689e3

Please sign in to comment.