summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2021-05-11 19:37:31 +0900
committerYusuke Endoh <[email protected]>2021-05-11 19:38:06 +0900
commit1b61cdd5e0997b18ac63cbb21911d0e286df26d3 (patch)
treee8b81813209c7bd31ae708c0d4498137055151f1
parentc6a11b865e1f9085c88fe169a1f47680383580c2 (diff)
test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/irb/test_raise_no_backtrace_exception.rb b/test/irb/test_raise_no_backtrace_exception.rb
index d4ca50a856..633646e680 100644
--- a/test/irb/test_raise_no_backtrace_exception.rb
+++ b/test/irb/test_raise_no_backtrace_exception.rb
@@ -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