aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-03 13:53:53 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-03 13:53:53 +0000
commit61c148723d128db48196a7f46e9ba2b7e704fc37 (patch)
tree1dc9029efb2af723462686153bb0d85008608131 /test
parentcb5217088bfa512c359cbcd5d2ec177590bd13f0 (diff)
downloadruby-61c148723d128db48196a7f46e9ba2b7e704fc37.tar.gz
* process.c (rb_run_exec_options_err): chdir at last to interpret
relative pathnames from the current directory of the parent process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index a1c5822417..3dab8e0bfa 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -327,6 +327,16 @@ class TestProcess < Test::Unit::TestCase
}
end
+ def test_execopts_open_chdir
+ with_tmpchdir {|d|
+ Dir.mkdir "foo"
+ system(*PWD, :chdir => "foo", :out => "open_chdir_test")
+ assert(File.exist?("open_chdir_test"))
+ assert(!File.exist?("foo/open_chdir_test"))
+ assert_equal("#{d}/foo", File.read("open_chdir_test").chomp)
+ }
+ end
+
UMASK = [RUBY, '-e', 'printf "%04o\n", File.umask']
def test_execopts_umask