зеркало из https://github.com/github/ruby.git
Run r66972 assertion only when a sticky-bit makes sense
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
cb5a329814
Коммит
af83a85f75
|
@ -742,13 +742,14 @@ class TestFileUtils < Test::Unit::TestCase
|
|||
assert_file_not_exist 'tmp/tmpdir/c'
|
||||
|
||||
File.chmod(01777, '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'
|
||||
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
|
||||
|
||||
Dir.rmdir 'tmp/tmpdir'
|
||||
|
||||
end
|
||||
|
||||
def test_remove_entry_secure_symlink
|
||||
|
|
Загрузка…
Ссылка в новой задаче