summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-24 15:57:44 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-24 15:57:44 +0000
commit017248d57f759c526b133b4bc1a4aab4d584c820 (patch)
tree2c9f07772added8d28dc10e893c97ffe9a45afc4 /test/ruby
parent6dd415de6f9f7acd8d0a43bbd6798709b1b9c7c9 (diff)
downloadruby-017248d57f759c526b133b4bc1a4aab4d584c820.tar.gz
ruby-017248d57f759c526b133b4bc1a4aab4d584c820.tar.xz
ruby-017248d57f759c526b133b4bc1a4aab4d584c820.zip
FreeBSD ash doesn't fail with echo >&4 where 4 is not opened.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_process.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 4f0f2f00b..d8113d718 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -453,24 +453,21 @@ class TestProcess < Test::Unit::TestCase
def test_execopts_close_others
with_tmpchdir {|d|
with_pipe {|r, w|
- system("exec 2>err; echo ma >&#{w.fileno}", :close_others=>true)
+ system("exec >/dev/null 2>err; echo ma >&#{w.fileno}", :close_others=>true)
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|
- Process.wait spawn("exec 2>err; echo mi >&#{w.fileno}", :close_others=>true)
+ Process.wait spawn("exec >/dev/null 2>err; echo mi >&#{w.fileno}", :close_others=>true)
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|
- Process.wait fork { exec("exec 2>err; echo mu >&#{w.fileno}", :close_others=>true) }
+ Process.wait fork { exec("exec >/dev/null 2>err; echo mu >&#{w.fileno}", :close_others=>true) }
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|