aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_system.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index edc70a4496..477767905b 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -181,7 +181,9 @@ class TestSystem < Test::Unit::TestCase
assert_raise_with_message(RuntimeError, /\ACommand failed with exit /) do
system("'#{ruby}' -e abort", exception: true)
end
+ end
+ def test_system_exception_nonascii
Dir.mktmpdir("ruby_script_tmp") do |tmpdir|
name = "\u{30c6 30b9 30c8}"
tmpfilename = "#{tmpdir}/#{name}.cmd"
@@ -190,6 +192,7 @@ class TestSystem < Test::Unit::TestCase
system(tmpfilename, exception: true)
end
open(tmpfilename, "w") {|f|
+ f.print "@" if /mingw|mswin/ =~ RUBY_PLATFORM
f.puts "exit 127"
f.chmod(0755)
}