1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2015-04-12 00:06:20 +00:00
parent a96034cf10
commit a2d1956454
2 changed files with 29 additions and 12 deletions

View file

@ -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.

View file

@ -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