Skip to content

Commit

Permalink
Omit 2 encoding error related tests for TruffleRuby (#854)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
st0012 authored Jan 31, 2024
1 parent a641746 commit bfafaa5
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 bfafaa5

Please sign in to comment.