diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/test_file_exhaustive.rb | 36 |
2 files changed, 29 insertions, 12 deletions
@@ -1,3 +1,8 @@ +Sun Apr 12 09:04:37 2015 NAKAMURA Usaku <[email protected]> + + * test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file + modes. + Sun Apr 12 08:56:44 2015 Tanaka Akira <[email protected]> * ext/-test-/file/fs.c: OpenBSD needs sys/param.h before sys/mount.h. diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 98f154c173..20bc37990a 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -59,26 +59,38 @@ class TestFileExhaustive < Test::Unit::TestCase def suidfile return @suidfile if defined? @suidfile - @suidfile = make_tmp_filename("suidfile") - make_file("", @suidfile) - File.chmod 04500, @suidfile - @suidfile + if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM + @suidfile = make_tmp_filename("suidfile") + make_file("", @suidfile) + File.chmod 04500, @suidfile + @suidfile + else + @suidfile = nil + end end def sgidfile return @sgidfile if defined? @sgidfile - @sgidfile = make_tmp_filename("sgidfile") - make_file("", @sgidfile) - File.chmod 02500, @sgidfile - @sgidfile + if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM + @sgidfile = make_tmp_filename("sgidfile") + make_file("", @sgidfile) + File.chmod 02500, @sgidfile + @sgidfile + else + @sgidfile = nil + end end def stickyfile return @stickyfile if defined? @stickyfile - @stickyfile = make_tmp_filename("stickyfile") - Dir.mkdir(@stickyfile) - File.chmod 01500, @stickyfile - @stickyfile + if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM + @stickyfile = make_tmp_filename("stickyfile") + Dir.mkdir(@stickyfile) + File.chmod 01500, @stickyfile + @stickyfile + else + @stickyfile = nil + end end def symlinkfile |