13 Commits

Author SHA1 Message Date
Rob Landley
b947b52b81 Promote fold and touch tests to "make tests". 2024-04-04 22:04:41 -05:00
Rob Landley
c9e684a5a3 Replace more SKIP_HOST with toyonly.
SKIP_HOST won't run a test when TEST_HOST set, but toyonly runs its arguments
whenever testing toybox (including when the host version is toybox).
2020-05-29 00:34:24 -05:00
Elliott Hughes
ccf574ecc4 touch.test: add missing TZ=utcs.
I don't know why we fixed the other tests but not this one. Before this
patch it's failing with/without TEST_HOST. After this patch, it passes
both.
2019-06-27 14:51:13 -05:00
Rob Landley
d78f05e91b Make touch use xparsedate() (result: -t and -d the same, autodetects format),
and fix tests to pass on host too.
2019-03-26 15:40:00 -05:00
Rob Landley
7a46d1db95 Chmod +x tests that pass with VERBOSE=fail and -x on tests needing work. 2018-11-20 17:44:43 -06:00
Elliott Hughes
36b6eb775f Fix touch -a/-m (and add the missing tests).
utimensat takes atime in [0] and mtime in [1], but since we're overwriting
with UTIME_OMIT, we actually want to flip the comparison so -a blats 1 and
-m blats 0.
2017-04-11 12:25:13 -05:00
Rob Landley
9c0ad3248f Add special "touch -" behavior and require an argument. 2016-10-20 16:35:13 -05:00
Rob Landley
354ff68314 More touch tests, and a fix found by one. (The three -t formats can only
reliably be distinguished by checking length, because %H amd %m and such
can match different numbers of digits.)
2016-10-19 20:51:28 -05:00
Rob Landley
9f3d8aa80f Unify touch -t and -d handling, allow posix's underspecified "time designator"
T to be a space instead (because the posix says so, no idea why), initialize
default values reliably including zeroing daylight savings time field (which is
handled inconsistently by libc and just screws stuff up).
2016-10-18 04:10:01 -05:00
Davis Mosenkovs
00385e8d0e Fix touch -t seconds parsing 2016-04-21 17:16:13 -05:00
Rob Landley
336c44adca Factor out command name at the start of test name, have runtest.sh print it. 2016-03-02 15:20:04 -06:00
Rob Landley
671146c3b4 Actually set time with touch -d and -t when you don't specify nanonseconds.
There's a nanoseconds field value that says use current time, which I set
but forgot to clear in the right places. (Oops.)
2015-07-04 03:49:53 -05:00
Rob Landley
387edf547e Move testsuite out of scripts/test into its own top level tests directory, and make ctrl-c kill "make test" more reliably. 2014-09-20 13:09:14 -05:00