mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
cat: return the same error message as GNU with loop symlink (#5466)
* cat: return the same error message as GNU with loop symlink Should fix tests/du/long-sloop.sh because it is using cat as a ref for error messages Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
64916b0698
commit
c24a51403a
2 changed files with 32 additions and 2 deletions
|
@ -540,3 +540,15 @@ fn test_write_to_self() {
|
|||
"first_file_content.second_file_content."
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(unix)]
|
||||
fn test_error_loop() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.symlink_file("2", "1");
|
||||
at.symlink_file("3", "2");
|
||||
at.symlink_file("1", "3");
|
||||
ucmd.arg("1")
|
||||
.fails()
|
||||
.stderr_is("cat: 1: Too many levels of symbolic links\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue