summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAJ ONeal <coolaj86@gmail.com>2020-12-10 23:54:00 -0700
committerAbin Simon <abinsimon10@gmail.com>2020-12-11 16:43:45 +0530
commit760d5c7538e96de766114898c967716f70e14439 (patch)
treef99db67000285214e0432218d58d9247571fbed3 /tests
parent1cdef5fe96eb60bfe8c66f7e08b6bd5c221cdc20 (diff)
add tree test
Diffstat (limited to 'tests')
-rw-r--r--tests/integration.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/integration.rs b/tests/integration.rs
index e78da82..4f09ad7 100644
--- a/tests/integration.rs
+++ b/tests/integration.rs
@@ -398,6 +398,20 @@ fn test_bad_utf_8_name() {
}
#[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]
fn test_tree_d() {
let tmp = tempdir();
tmp.child("one").touch().unwrap();