mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
217a4bd283
commit
7c6df6dc17
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue