mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 13:42:34 +00:00
add tree test
This commit is contained in:
parent
1cdef5fe96
commit
760d5c7538
1 changed files with 14 additions and 0 deletions
|
@ -397,6 +397,20 @@ fn test_bad_utf_8_name() {
|
||||||
.stdout(predicate::str::is_match("bad-name\u{fffd}\u{fffd}.ext\n$").unwrap());
|
.stdout(predicate::str::is_match("bad-name\u{fffd}\u{fffd}.ext\n$").unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_tree() {
|
||||||
|
let tmp = tempdir();
|
||||||
|
tmp.child("one").touch().unwrap();
|
||||||
|
tmp.child("one.d").create_dir_all().unwrap();
|
||||||
|
tmp.child("one.d/two").touch().unwrap();
|
||||||
|
|
||||||
|
cmd()
|
||||||
|
.arg(tmp.path())
|
||||||
|
.arg("--tree")
|
||||||
|
.assert()
|
||||||
|
.stdout(predicate::str::is_match("├── one\n└── one.d\n └── two\n$").unwrap());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_tree_d() {
|
fn test_tree_d() {
|
||||||
let tmp = tempdir();
|
let tmp = tempdir();
|
||||||
|
|
Loading…
Reference in a new issue