diff options
Diffstat (limited to 'test/fileutils')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index bacbb51aa8..edafcd14e6 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -633,6 +633,14 @@ end assert_equal 0700, (File.stat('tmp/tmp/tmp').mode & 0777) if have_file_perm? rm_rf 'tmp/tmp' + mkdir_p 'tmp/tmp', :mode => 0 + assert_directory 'tmp/tmp' + assert_equal 0, (File.stat('tmp/tmp').mode & 0777) if have_file_perm? + # DO NOT USE rm_rf here. + # (rm(1) try to chdir to parent directory, it fails to remove directory.) + Dir.rmdir 'tmp/tmp' + Dir.rmdir 'tmp' + # pathname assert_nothing_raised { mkdir_p Pathname.new('tmp/tmp/tmp') |