mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
Merge pull request #2339 from sylvestre/gnu-compat
Improve the gnu compat and use it for "touch"
This commit is contained in:
commit
24032498ad
5 changed files with 51 additions and 5 deletions
|
@ -449,3 +449,20 @@ fn test_touch_mtime_dst_fails() {
|
|||
ucmd.args(&["-m", "-t", &s, file]).fails();
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn test_touch_system_fails() {
|
||||
let (_at, mut ucmd) = at_and_ucmd!();
|
||||
let file = "/";
|
||||
ucmd.args(&[file])
|
||||
.fails()
|
||||
.stderr_contains("setting times of '/'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_touch_trailing_slash() {
|
||||
let (_at, mut ucmd) = at_and_ucmd!();
|
||||
let file = "no-file/";
|
||||
ucmd.args(&[file]).fails();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue