add tests for no symlink on grid

This commit is contained in:
Abin Simon 2020-08-16 19:23:27 +05:30
parent d9b7a5599d
commit e09bcc2b77

View file

@ -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]