mirror of
https://github.com/lsd-rs/lsd.git
synced 2026-04-21 02:45:58 +02:00
Remove unnecessary use of read_link
This commit is contained in:
@@ -263,6 +263,30 @@ fn test_dereference_link_right_type_and_no_link() {
|
||||
.stdout(predicate::str::contains(link_icon).not());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn test_dereference_link_broken_link() {
|
||||
let dir = tempdir();
|
||||
let link = dir.path().join("link");
|
||||
fs::symlink("target", &link).unwrap();
|
||||
|
||||
cmd()
|
||||
.arg("-l")
|
||||
.arg("--dereference")
|
||||
.arg("--ignore-config")
|
||||
.arg(&link)
|
||||
.assert()
|
||||
.stderr(predicate::str::contains("No such file or directory"));
|
||||
|
||||
cmd()
|
||||
.arg("-l")
|
||||
.arg("-L")
|
||||
.arg("--ignore-config")
|
||||
.arg(link)
|
||||
.assert()
|
||||
.stderr(predicate::str::contains("No such file or directory"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn test_show_folder_content_of_symlink() {
|
||||
|
||||
Reference in New Issue
Block a user