Commit graph

19 commits

Author SHA1 Message Date
Jeffrey Finkelstein
f37e78c25a touch: show error on -h with nonexistent file
Show an error message when running `touch -h` on a nonexistent file.
2022-02-11 20:58:16 -05:00
Hanif Ariffin
9cd65c766a Add tests
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-03 21:14:56 +08:00
Daniel Eades
784f2e2ea1 use semicolons if nothing returned 2022-01-30 15:08:26 +01:00
Sylvestre Ledru
ed258e3c9c
touch: add --ref as an alias (#2641) 2021-09-09 21:48:17 +02:00
Sylvestre Ledru
2c3e401b0b Remove some warnings on freebsd 2021-08-28 15:06:44 +02:00
Sylvestre Ledru
697dca25cb silent the failed tests for now on freebsd 2021-08-24 09:32:27 +02:00
Michael Debertol
84affa2137 touch: support @<timestamp> date format
parse `@<seconds since epoch>` as a valid date.
2021-06-15 22:43:40 +02:00
David Suilea
25240ba61c
touch: change the error message to match the GNU error message #2346 2021-06-14 13:03:14 +02:00
Sylvestre Ledru
31875a241f touch/gnu compat: 'touch no-file' exit code should be 1 2021-06-02 23:50:35 +02:00
Sylvestre Ledru
eb2c06c37e touch/gnu compat: when touch fails because of a permission error, change the error message
+ return 1 as error code when having this error
2021-06-02 23:48:16 +02:00
Sylvestre Ledru
15da98d84e
Merge pull request #2315 from rivy/maint.fmt+spell
Spell check and correct the project
2021-05-31 21:00:04 +02:00
Dean Li
9d8e7b9acb
Fix touch parse date error
Now it can parse `touch -d 2000-01-23 file` and add test for parse date
error.

Related to #2311
2021-05-31 22:04:03 +08:00
Roy Ivy III
4e20dedf58 tests ~ refactor/polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Jan Scheer
3aeccfd802 fix a lot of clippy warnings 2021-05-29 15:11:22 +02:00
Aleksandar Janicijevic
df0304d8f4
touch: added unit test for test -m -t fail (#2089) 2021-04-18 22:36:43 +02:00
Aleksandar Janicijevic
fe207640e2
touch: dealing with DST in touch -m -t (#2073) 2021-04-17 10:08:10 +02:00
Terts Diepraam
fd5ec099d0
touch: use an ArgGroup for sources and turn macros into functions (#1813)
* touch: use arggroup for sources

* tests/touch: add tests for multiple sources

* touch: turn macros into functions

* test/touch: fmt

* touch: constant for the sources ArgGroup
2021-03-13 17:20:39 +01:00
Sylvestre Ledru
bfba889f8e
refactor(touch): Move to clap + add a test (#1629) 2020-11-21 09:53:13 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_touch.rs (Browse further)