From 26336dda678e9c9f64c185d5888f28c061a03eb7 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 18 Aug 2018 02:44:35 +0000 Subject: [PATCH] test/ruby/test_system.rb: suppress prompt and echo on Windows git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_system.rb | 3 +++ 1 file changed, 3 insertions(+) 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) }