1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Explicitly specify encoding for another test as well

Same as e2ccc3301e
https://ci.appveyor.com/project/ruby/ruby/builds/39102539/job/k8m1yrrjesxbgvtq
This commit is contained in:
Takashi Kokubun 2021-05-10 21:41:36 -07:00
parent 7c346e1072
commit afa70d079f
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -17,13 +17,13 @@ IRB
def test_raise_exception_with_invalid_byte_sequence def test_raise_exception_with_invalid_byte_sequence
skip if RUBY_ENGINE == 'truffleruby' skip if RUBY_ENGINE == 'truffleruby'
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : [] 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" raise StandardError, "A\\xf3B"
IRB IRB
end end
def test_raise_exception_with_different_encoding_containing_invalid_byte_sequence 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"] backup_home = ENV["HOME"]
Dir.mktmpdir("test_irb_raise_no_backtrace_exception_#{$$}") do |tmpdir| Dir.mktmpdir("test_irb_raise_no_backtrace_exception_#{$$}") do |tmpdir|
ENV["HOME"] = tmpdir ENV["HOME"] = tmpdir