Skip to content

Commit

Permalink
Explicitly specify encoding for another test as well
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed May 11, 2021
1 parent 7c346e1 commit afa70d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/irb/test_raise_no_backtrace_exception.rb
Expand Up @@ -17,13 +17,13 @@ def e.backtrace; nil; end
def test_raise_exception_with_invalid_byte_sequence
skip if RUBY_ENGINE == 'truffleruby'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<~IRB, /A\\xF3B \(StandardError\)/, [])
assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<~IRB, /A\\xF3B \(StandardError\)/, [], encoding: "UTF-8")
raise StandardError, "A\\xf3B"
IRB
end

def test_raise_exception_with_different_encoding_containing_invalid_byte_sequence
skip if RUBY_ENGINE == 'truffleruby' || /mswin|mingw/ =~ RUBY_PLATFORM
skip if RUBY_ENGINE == 'truffleruby'
backup_home = ENV["HOME"]
Dir.mktmpdir("test_irb_raise_no_backtrace_exception_#{$$}") do |tmpdir|
ENV["HOME"] = tmpdir
Expand Down

0 comments on commit afa70d0

Please sign in to comment.