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

test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8

This commit is contained in:
Yusuke Endoh 2021-05-11 19:37:31 +09:00
parent c6a11b865e
commit 1b61cdd5e0

View file

@ -38,7 +38,9 @@ IRB
end
EOF
end
assert_in_out_err(bundle_exec + %w[-rirb -W0 -e ENV[%(LC_ALL)]=%(ja_JP.UTF-8) -e ENV[%(LANG)]=%(ja_JP.UTF-8) -e IRB.start(__FILE__) -- -f --], <<~IRB, /`raise_euc_with_invalid_byte_sequence': あ\\xFF \(RuntimeError\)/, [], encoding: "UTF-8")
env = {}
%w(LC_MESSAGES LC_ALL LC_CTYPE LANG).each {|n| env[n] = "ja_JP.UTF-8" }
assert_in_out_err([env] + bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<~IRB, /`raise_euc_with_invalid_byte_sequence': あ\\xFF \(RuntimeError\)/, [], encoding: "UTF-8")
require_relative 'euc'
raise_euc_with_invalid_byte_sequence
IRB