1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

refactor(touch): Move to clap + add a test (#1629)

This commit is contained in:
Sylvestre Ledru 2020-11-21 09:53:13 +01:00 committed by GitHub
parent 5efaa0bf32
commit bfba889f8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 129 additions and 93 deletions

View file

@ -195,6 +195,14 @@ fn test_touch_set_only_atime() {
assert_eq!(atime.unix_seconds() - start_of_year.unix_seconds(), 45240);
}
#[test]
fn test_touch_set_only_mtime_failed() {
let (_at, mut ucmd) = at_and_ucmd!();
let file = "test_touch_set_only_mtime";
ucmd.args(&["-t", "2015010112342", "-m", file]).fails();
}
#[test]
fn test_touch_set_only_mtime() {
let (at, mut ucmd) = at_and_ucmd!();