diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 00:06:20 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-12 00:06:20 +0000 |
commit | a2d1956454e6e2868b25f16e6f5815f4aa2fa0e0 (patch) | |
tree | d9ec537e548c3bec3862f9b9c1841e71b52ec4a7 | |
parent | a96034cf101fd8623a854662a93e77a2ccbd6b0b (diff) | |
download | ruby-a2d1956454e6e2868b25f16e6f5815f4aa2fa0e0.tar.gz |
* test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file
modes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 <usa@ruby-lang.org> + + * test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix file + modes. + Sun Apr 12 08:56:44 2015 Tanaka Akira <akr@fsij.org> * 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 |