Commit graph

11 commits

Author SHA1 Message Date
Roy Ivy III
b3846bf8f1 tests/fix ~ (stat) remove '%a', '%d', '%f' from file system test format due to race conditions 2020-01-27 21:33:47 -06:00
Roy Ivy III
823fc17c2c tests/fix ~ (stat) refactor '%w' and '%W' tests due to stat limitations
- allow actual outputs to differ from expected (ie, `stat`) if `stat` is reporting "unknown" creation time

.# [why]

For many *nix flavors, `stat` is unable to detect birth/creation date
for directories/files. The information is available via the `statx()`
system call (for linux kernels >= v4.11), and rust supplies that
information via fs::MetadataExt for v1.40+. So, for rust v1.40+, there
will likely be a mismatch between the output of the system `stat` and
this ('uutils') `stat`.

* ref: <https://askubuntu.com/questions/470134/how-do-i-find-the-creation-time-of-a-file> @@ <https://archive.is/IsEAJ>
2020-01-27 21:33:47 -06:00
Roy Ivy III
25d4fb71ca tests/refactor ~ change to use of common code (TestScenario::...) for testing 2020-01-27 21:33:47 -06:00
Valentin Lorentz
248f480b41 Don't assume tests are running on a computer with an English locale. 2018-04-22 08:07:38 +02:00
Wim Hueskes
e2519bf0b3 stat: fix test on travis
/dev/pts/ptmx seems to be the only character special file in /dev
which is not a bind-mount in the docker container run by travis.
gnu stat does not detect these mounts, so produces a different
output for /dev/zero.
2016-11-21 19:36:23 +01:00
nathanross
aa6ee03be3 tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
Nathan Ross
569cd162d3 tests: refactor conventional TestScenario usage
Updates to individual integration tests

  - use proposed conventional approach to beginning tests

  - use new convenience functions for using fixtures

  - use new names for TestScenario

Updates to integration test modules

  - add proposed conventional module-level functions

Updates to test/common/util.rs

  - rename TestSet, and its methods, for semantic clarity

  - create convenience functions for use of fixtures

  - delete convenience functions obsoleted by new conventions
2016-08-01 13:42:00 -04:00
Knight
5ef26aad1c stat: remove warning in test 2016-07-29 21:19:52 +08:00
Knight
6fff3a7665 pinky: cleanup the code 2016-07-26 16:44:30 +08:00
Knight
02dc461cf8 stat: implement ' format directive & add tests 2016-06-17 16:15:50 +08:00
Knight
48968f3d8a stat: Add tests 2016-06-05 11:38:56 +08:00