summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 08:59:43 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 08:59:43 +0000
commit0a0eb2807ed745e1cdf7f4698fe805b4aaaee2c6 (patch)
tree8f9c50d3f76ae5d7c5cdc0bf4313f989262d0a63 /test
parent8d2e44c2703d130bdc7005c397251a29351c34fc (diff)
Refix r56559 with Fs.noatime? [ruby-core:77943] [Bug #12903]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_file.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 67f6206931..cdbc19c0d4 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -2,6 +2,7 @@
require 'test/unit'
require 'tempfile'
require "thread"
+require "-test-/file"
require_relative 'ut_eof'
class TestFile < Test::Unit::TestCase
@@ -359,7 +360,6 @@ class TestFile < Test::Unit::TestCase
File.write(path, "bar")
sleep 2
File.read(path)
- a0 = File.stat(path).atime
File.chmod(0644, path)
sleep 2
File.read(path)
@@ -371,7 +371,7 @@ class TestFile < Test::Unit::TestCase
if stat.birthtime != stat.ctime
assert_in_delta t0+4, stat.ctime.to_f, delta
end
- if a0 > stat.mtime
+ if /mswin|mingw/ !~ RUBY_PLATFORM && !Bug::File::Fs.noatime?(path)
# Windows delays updating atime
assert_in_delta t0+6, stat.atime.to_f, delta
end