-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Currently some tests use Project::change_file
with an empty content string just to update the modified time of the file e.g.:
cargo/tests/testsuite/freshness.rs
Line 558 in bdef274
p.change_file("src/lib.rs", ""); |
However, updating a zero length file to be zero length isn't guaranteed to change the modified time (it might be a no-op). Cargo's tests should explicitly set the modified time using the new File::set_times
API.
There are at least a couple of ways this could be done. An explicit method could be added and used in place of calling change_file
with an empty string. Or else change_file
(or the underlying FileBuilder
) could be updated to always set the modified time.
Metadata
Metadata
Assignees
Labels
No labels