Project

General

Profile

Bug #7109 ยป file_utime_fail.rb

Anonymous, 10/05/2012 03:47 PM

 
require 'test/unit'

class TestUtime < MiniTest::Unit::TestCase
def test_utime
File.open('a', 'w') { |f| f.write('asd'); f.close }
a = File.new('a')
t = Time.now
File.utime(t, t, a)

assert_equal(t.nsec, a.mtime.nsec)

File.delete('a')
end
end
    (1-1/1)