diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-27 13:03:01 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-27 13:03:01 +0000 |
commit | f0f7079d48c2b154341e8bd8464b845ef992739d (patch) | |
tree | 3b06c58e92cec801b6daadfe053d002dc5607349 /test/ruby/test_system.rb | |
parent | c6598ffcaed5de0f936b62f3a29b725d6d5ca73d (diff) | |
download | ruby-f0f7079d48c2b154341e8bd8464b845ef992739d.tar.gz |
* test/ruby/test_system.rb (TestSystem#test_system_redirect_win):
add test for system().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_system.rb')
-rw-r--r-- | test/ruby/test_system.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index bb77ad445e..e54b0f4b43 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -126,6 +126,18 @@ class TestSystem < Test::Unit::TestCase end end + def test_system_redirect_win + if /mswin|mingw/ !~ RUBY_PLATFORM + return + end + + cmd = "%WINDIR%/system32/ping.exe \"BFI3CHL671\" > out.txt 2>NUL" + assert_equal(false, system(cmd), '[ruby-talk:258939]'); + + cmd = "\"%WINDIR%/system32/ping.exe BFI3CHL671\" > out.txt 2>NUL" + assert_equal(false, system(cmd), '[ruby-talk:258939]'); + end + def test_empty_evstr assert_equal("", eval('"#{}"', nil, __FILE__, __LINE__), "[ruby-dev:25113]") end |