diff --git a/ChangeLog b/ChangeLog index b30fd8d13e..306aea511f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 19 03:12:51 2009 Yusuke Endoh + + * test/ruby/test_file_exhaustive.rb: skip some tests if euid == 0. + a patch from Lucas Nussbaum in [ruby-core:22209]. + Thu Feb 19 03:00:49 2009 Akinori MUSHA * README.EXT, README.EXT.ja: Improve the document about @@ -16267,7 +16272,7 @@ Tue Jun 24 09:40:47 2008 NAKAMURA Usaku Tue Jun 24 00:21:53 2008 Yusuke Endoh * compile.c (iseq_build_from_ary): initialize arg_opts, a patch from - Adam Strzelecki in [ruby-core:17220]. + Adam Strzelecki in [ruby-core:17220]. Tue Jun 24 00:10:53 2008 wanabe diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index af6e0e1520..d9fe5505fe 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)