mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-16 03:36:18 +00:00
also support for tests/touch/no-rights.sh format
This commit is contained in:
parent
087d4b14fc
commit
d5569847bd
2 changed files with 33 additions and 1 deletions
|
@ -469,6 +469,25 @@ fn test_touch_set_date5() {
|
|||
assert_eq!(mtime, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_touch_set_date6() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let file = "test_touch_set_date";
|
||||
|
||||
ucmd.args(&["-d", "2000-01-01 00:00", file])
|
||||
.succeeds()
|
||||
.no_stderr();
|
||||
|
||||
assert!(at.file_exists(file));
|
||||
|
||||
let expected = FileTime::from_unix_time(946684800, 0);
|
||||
|
||||
let (atime, mtime) = get_file_times(&at, file);
|
||||
assert_eq!(atime, mtime);
|
||||
assert_eq!(atime, expected);
|
||||
assert_eq!(mtime, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_touch_set_date_wrong_format() {
|
||||
let (_at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue