mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
readlink: symlink loop handling (#3717)
readlink: fix symlink loop handling
This commit is contained in:
parent
882cd527ff
commit
0ea3a735ca
2 changed files with 12 additions and 1 deletions
|
@ -70,3 +70,13 @@ fn test_long_redirection_to_root() {
|
|||
println!("expect: {:?}", expect);
|
||||
assert_eq!(actual, expect);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_symlink_to_itself_verbose() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.relative_symlink_file("a", "a");
|
||||
ucmd.args(&["-ev", "a"])
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("Too many levels of symbolic links");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue