* 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
This commit is contained in:
akr 2012-03-03 13:53:53 +00:00
parent cb5217088b
commit 61c148723d
3 changed files with 35 additions and 20 deletions

View file

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