diff options
author | Guillaume Ranquet <granquet@baylibre.com> | 2023-06-08 11:26:21 +0200 |
---|---|---|
committer | Guillaume Ranquet <granquet@baylibre.com> | 2023-06-26 14:46:56 +0200 |
commit | 80c7ed9732562633a63aea8d0705b7ffe9a99bf8 (patch) | |
tree | 15cd5d94f94ac1739618fd6821089e0055dd2aca /tests | |
parent | ba7c53ae5ac548b89887d240047212c93d8ab521 (diff) |
ls: force fetching metadata when called with -L -Z
The metadata are not used but it permits to check the symlink is valid.
We then return 1 on invalid symlinks when ls is invoked with ls -L -Z
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/by-util/test_ls.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 1266a7cab..ad2c6424f 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -3139,6 +3139,16 @@ fn test_ls_dangling_symlinks() { scene .ucmd() + .arg("-LZ") + .arg("temp_dir") + .fails() + .code_is(1) + .stderr_contains("cannot access") + .stderr_contains("No such file or directory") + .stdout_contains(if cfg!(windows) { "dangle" } else { "? dangle" }); + + scene + .ucmd() .arg("-Ll") .arg("temp_dir") .fails() |