mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-14 06:02:36 +00:00
add tests for no symlink on grid
This commit is contained in:
parent
d9b7a5599d
commit
e09bcc2b77
1 changed files with 20 additions and 0 deletions
|
@ -156,6 +156,26 @@ fn test_list_broken_link_ok() {
|
|||
.assert()
|
||||
.stderr(predicate::str::contains(matched).not());
|
||||
}
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn test_nosymlink_on_non_long() {
|
||||
let dir = tempdir();
|
||||
dir.child("target").touch().unwrap();
|
||||
let link = dir.path().join("link");
|
||||
let link_icon = "⇒";
|
||||
fs::symlink("target", &link).unwrap();
|
||||
|
||||
cmd()
|
||||
.arg("-l")
|
||||
.arg(&link)
|
||||
.assert()
|
||||
.stdout(predicate::str::contains(link_icon));
|
||||
|
||||
cmd()
|
||||
.arg(&link)
|
||||
.assert()
|
||||
.stdout(predicate::str::contains(link_icon).not());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue