1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

touch: -h should not fail when running on broken symlink

Fixes more of tests/touch/no-dereference.sh
This commit is contained in:
Sylvestre Ledru 2023-04-22 08:56:01 +02:00
parent c3656e561c
commit aaea758b6a
2 changed files with 20 additions and 1 deletions

View file

@ -825,3 +825,11 @@ fn test_touch_no_dereference_ref_dangling() {
ucmd.args(&["-h", "-r", "dangling", "file"]).succeeds();
}
#[test]
fn test_touch_no_dereference_dangling() {
let (at, mut ucmd) = at_and_ucmd!();
at.relative_symlink_file("nowhere", "dangling");
ucmd.args(&["-h", "dangling"]).succeeds();
}