mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
Add test for double printing dangling link errors
This commit is contained in:
parent
4ea61545c6
commit
4052d4ec6a
1 changed files with 11 additions and 1 deletions
|
@ -56,8 +56,8 @@ fn test_ls_ordering() {
|
|||
.stdout_matches(&Regex::new("some-dir1:\\ntotal 0").unwrap());
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "chmod"))]
|
||||
#[test]
|
||||
#[cfg(feature = "chmod")]
|
||||
fn test_ls_io_errors() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
@ -105,6 +105,16 @@ fn test_ls_io_errors() {
|
|||
.stderr_contains("cannot open directory")
|
||||
.stderr_contains("Permission denied")
|
||||
.stdout_contains("some-dir4");
|
||||
|
||||
// test we don't double print on dangling link metadata errors
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-iRL")
|
||||
.arg("some-dir2")
|
||||
.fails()
|
||||
.stderr_does_not_contain(
|
||||
"ls: cannot access 'some-dir2/dangle': No such file or directory\nls: cannot access 'some-dir2/dangle': No such file or directory"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue