mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 19:36:16 +00:00
touch: -h -r should not fail when running on broken symlink
Fixes the beginning of: tests/touch/no-dereference.sh
This commit is contained in:
parent
afa5c15581
commit
c3656e561c
2 changed files with 23 additions and 6 deletions
|
@ -816,3 +816,12 @@ fn test_touch_trailing_slash_no_create() {
|
|||
at.relative_symlink_dir("dir2", "link2");
|
||||
ucmd.args(&["-c", "link2/"]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_touch_no_dereference_ref_dangling() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.touch("file");
|
||||
at.relative_symlink_file("nowhere", "dangling");
|
||||
|
||||
ucmd.args(&["-h", "-r", "dangling", "file"]).succeeds();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue