diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-10 06:56:20 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-09-10 06:56:20 +0000 |
| commit | f9ab19a0b015e7916c1fa15aa08c004d59a1ba83 (patch) | |
| tree | b17b25fae7ee9d3440514b9394e6eeb8dd7d36dc /test/fileutils | |
| parent | 826f9f7f18c86d8a3886934a9df79d2390ea07cc (diff) | |
| download | ruby-f9ab19a0b015e7916c1fa15aa08c004d59a1ba83.tar.gz ruby-f9ab19a0b015e7916c1fa15aa08c004d59a1ba83.tar.xz ruby-f9ab19a0b015e7916c1fa15aa08c004d59a1ba83.zip | |
* lib/fileutils.rb (mkdir_p): should pass mode argument to Dir.mkdir. [ruby-dev:24242]
* test/fileutils/test_fileutils.rb: test it.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 bacbb51aa..edafcd14e 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') |
