test_file_exhaustive.rb: skip when root

* test/ruby/test_file_exhaustive.rb (test_owned_p): skipt when
  running as super user.

* test/ruby/test_file_exhaustive.rb (test_stat_owned_p): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-12 01:03:30 +00:00
Родитель 2722cb9ce1
Коммит fe294d75fe
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -409,7 +409,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def test_owned_p
return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
assert_file.owned?(regular_file)
assert_file.not_owned?(notownedfile)
assert_file.not_owned?(notownedfile) if notownedfile
end
def test_grpowned_p ## xxx
@ -1365,7 +1365,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def test_stat_owned_p
return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM
assert(File::Stat.new(regular_file).owned?)
assert(!File::Stat.new(notownedfile).owned?)
assert(!File::Stat.new(notownedfile).owned?) if notownedfile
end
def test_stat_grpowned_p ## xxx