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
This commit is contained in:
nobu 2018-08-18 02:44:35 +00:00
parent b2826ef7e9
commit 26336dda67

View File

@ -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)
}