mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls -l: show an error when symlink not readable
switching to match and handle the error Will help with tests/ls/stat-failed.sh
This commit is contained in:
parent
97aa8ae5db
commit
37ee889003
2 changed files with 71 additions and 43 deletions
|
@ -3503,3 +3503,22 @@ fn test_invalid_utf8() {
|
|||
at.touch(filename);
|
||||
ucmd.succeeds();
|
||||
}
|
||||
|
||||
#[cfg(all(unix, feature = "chmod"))]
|
||||
#[test]
|
||||
fn test_ls_perm_io_errors() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
at.mkdir("d");
|
||||
at.symlink_file("/", "d/s");
|
||||
|
||||
scene.ccmd("chmod").arg("600").arg("d").succeeds();
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-l")
|
||||
.arg("d")
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("Permission denied");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue