1
Fork 0
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:
Sylvestre Ledru 2023-10-28 22:29:24 +02:00 committed by GitHub
parent 64916b0698
commit c24a51403a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 2 deletions

View file

@ -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");
}