[前][次][番号順一覧][スレッド一覧]

ruby-changes:33978

From: nobu <ko1@a...>
Date: Fri, 23 May 2014 21:32:02 +0900 (JST)
Subject: [ruby-changes:33978] nobu:r46059 (trunk): test_file.rb: fix ctime on Windows

nobu	2014-05-23 21:31:58 +0900 (Fri, 23 May 2014)

  New Revision: 46059

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46059

  Log:
    test_file.rb: fix ctime on Windows
    
    * test/ruby/test_file.rb (test_stat): `ctime` on Windows is not
      last changed time.

  Modified files:
    trunk/test/ruby/test_file.rb
Index: test/ruby/test_file.rb
===================================================================
--- test/ruby/test_file.rb	(revision 46058)
+++ test/ruby/test_file.rb	(revision 46059)
@@ -329,11 +329,11 @@ class TestFile < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_file.rb#L329
 
     delta = 1
     stat = File.stat(path)
+    assert_in_delta tb,   stat.birthtime.to_f, delta
+    assert_in_delta t0+2, stat.mtime.to_f, delta
     if stat.birthtime != stat.ctime
-      assert_in_delta tb,   stat.birthtime.to_f, delta
+      assert_in_delta t0+4, stat.ctime.to_f, delta
     end
-    assert_in_delta t0+2, stat.mtime.to_f, delta
-    assert_in_delta t0+4, stat.ctime.to_f, delta
     assert_in_delta t0+6, stat.atime.to_f, delta
   rescue NotImplementedError
   end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]