diff options
-rw-r--r-- | test/fileutils/test_fileutils.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index f74ae5a755..c81f5b40dc 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -741,12 +741,14 @@ class TestFileUtils < Test::Unit::TestCase assert_file_not_exist 'tmp/tmpdir/a' assert_file_not_exist 'tmp/tmpdir/c' - File.chmod(01777, 'tmp/tmpdir') - if File.sticky?('tmp/tmpdir') - Dir.mkdir 'tmp/tmpdir/d', 0 - assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'} - File.chmod 0777, 'tmp/tmpdir/d' - Dir.rmdir 'tmp/tmpdir/d' + unless root_in_posix? + File.chmod(01777, 'tmp/tmpdir') + if File.sticky?('tmp/tmpdir') + Dir.mkdir 'tmp/tmpdir/d', 0 + assert_raise(Errno::EACCES) {remove_entry_secure 'tmp/tmpdir/d'} + File.chmod 0777, 'tmp/tmpdir/d' + Dir.rmdir 'tmp/tmpdir/d' + end end Dir.rmdir 'tmp/tmpdir' |