diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-08-02 10:52:49 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-08-02 10:52:49 -0700 |
| commit | 2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de (patch) | |
| tree | ef1b05c80565c705f5f4d23a2de399aedcc7447a /src/libstd | |
| parent | 87bc22f587f1a18b447c4fa3cf967bbc0f7e7e17 (diff) | |
| download | rust-2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de.tar.gz rust-2677e5f4a07bf95b3abbc0cc8719e9e4e6b468de.zip | |
native: Fix utime() for windows
Apparently the units are in milliseconds, not in seconds!
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/fs.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index 1b2706b3f5b..246ff901f5c 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -1588,8 +1588,7 @@ mod test { "truncate didn't truncate"); }) - #[test] - fn utime() { + iotest!(fn utime() { let tmpdir = tmpdir(); let path = tmpdir.join("a"); check!(File::create(&path)); @@ -1597,17 +1596,16 @@ mod test { check!(change_file_times(&path, 1000, 2000)); assert_eq!(check!(path.stat()).accessed, 1000); assert_eq!(check!(path.stat()).modified, 2000); - } + }) - #[test] - fn utime_noexist() { + iotest!(fn utime_noexist() { let tmpdir = tmpdir(); match change_file_times(&tmpdir.join("a"), 100, 200) { Ok(..) => fail!(), Err(..) => {} } - } + }) iotest!(fn binary_file() { use rand::{StdRng, Rng}; |
