summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-11 18:15:25 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-11 18:15:25 +0000
commit7c6df6dc170a7e44c749518b06b0a4877f48c6ca (patch)
tree272da5278462df22453cc9f20196ae19ab928a2b
parent217a4bd2838f2daab8ec9b812317a40ae7a16ab4 (diff)
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_process.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 06d2529597..eed156b089 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1148,4 +1148,20 @@ class TestProcess < Test::Unit::TestCase
rescue ArgumentError
end
end
+
+ def test_no_curdir
+ if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
+ skip "removing current directory is not supported"
+ end
+ with_tmpchdir {|d|
+ Dir.mkdir("vd")
+ status = nil
+ Dir.chdir("vd") {
+ Dir.rmdir("#{d}/vd")
+ system(RUBY, "-e", "exit true")
+ status = $?
+ }
+ assert(status.success?)
+ }
+ end
end