diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-18 18:17:26 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-18 18:17:26 +0000 |
commit | 73c9a7b5172196e5d6bba19e438c128768d2406e (patch) | |
tree | bd1431bae7d09f6cccb41a99429ed0fb90dfccb9 /test | |
parent | 33b742495ec6ae8d759213a75474c8f66e06e4ca (diff) | |
download | ruby-73c9a7b5172196e5d6bba19e438c128768d2406e.tar.gz ruby-73c9a7b5172196e5d6bba19e438c128768d2406e.tar.xz ruby-73c9a7b5172196e5d6bba19e438c128768d2406e.zip |
* test/ruby/test_file_exhaustive.rb: skip some tests if euid == 0.
a patch from Lucas Nussbaum in [ruby-core:22209].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index af6e0e152..d9fe5505f 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -142,6 +142,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_readable_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0200, @file) assert(!(File.readable?(@file))) File.chmod(0600, @file) @@ -151,6 +152,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_readable_real_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0200, @file) assert(!(File.readable_real?(@file))) File.chmod(0600, @file) @@ -171,6 +173,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_writable_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0400, @file) assert(!(File.writable?(@file))) File.chmod(0600, @file) @@ -180,6 +183,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_writable_real_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0400, @file) assert(!(File.writable_real?(@file))) File.chmod(0600, @file) @@ -610,6 +614,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_stat_readable_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0200, @file) assert(!(File::Stat.new(@file).readable?)) File.chmod(0600, @file) @@ -618,6 +623,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_stat_readable_real_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0200, @file) assert(!(File::Stat.new(@file).readable_real?)) File.chmod(0600, @file) @@ -636,6 +642,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_stat_writable_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0400, @file) assert(!(File::Stat.new(@file).writable?)) File.chmod(0600, @file) @@ -644,6 +651,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_stat_writable_real_p return if /cygwin|mswin|bccwin|mingw|emx/ =~ RUBY_PLATFORM + return if Process.euid == 0 File.chmod(0400, @file) assert(!(File::Stat.new(@file).writable_real?)) File.chmod(0600, @file) |