mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_fileutils.rb: workaround for Cygwin
* test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin has some different conditions for privilege. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1ac36ecf00
commit
c85a58d512
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ class TestFileUtils < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def root_in_posix?
|
||||
if /cygwin/ =~ RUBY_PLATFORM
|
||||
# FIXME: privilege if groups include root user?
|
||||
return Process.groups.include?(0)
|
||||
end
|
||||
if Process.respond_to?('uid')
|
||||
return Process.uid == 0
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue