ruby-changes:23600
From: nobu <ko1@a...>
Date: Tue, 15 May 2012 23:55:06 +0900 (JST)
Subject: [ruby-changes:23600] nobu:r35651 (trunk): test for Bug #6385
nobu 2012-05-15 23:54:15 +0900 (Tue, 15 May 2012) New Revision: 35651 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35651 Log: test for Bug #6385 * test/ruby/test_file.rb (TestFile#test_utime): test for [Bug #6385]. Modified files: trunk/test/ruby/test_file.rb Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 35650) +++ test/ruby/test_file.rb (revision 35651) @@ -196,6 +196,26 @@ EOS end + def test_utime + bug6385 = '[ruby-core:44776]' + + mod_time_contents = Time.at 1306527039 + + file = Tempfile.new("utime") + file.close + path = file.path + + File.utime(File.atime(path), mod_time_contents, path) + stats = File.stat(path) + + file.open + file_mtime = file.mtime + file.close(true) + + assert_equal(mod_time_contents, file_mtime, bug6385) + assert_equal(mod_time_contents, stats.mtime, bug6385) + end + def test_chmod_m17n bug5671 = '[ruby-dev:44898]' Dir.mktmpdir('test-file-chmod-m17n-') do |tmpdir| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/