diff options
author | zwPapEr <zw.paper@gmail.com> | 2021-02-14 22:02:40 +0800 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2021-02-15 09:33:59 +0530 |
commit | 0ca699ee2f9c951948d02c83b6c0a45190969e22 (patch) | |
tree | 440d9993438645ad9c75ba24d412028d1f210571 /tests | |
parent | 36002a35acbf8bf77d111961c5e1112325ce80a6 (diff) |
display/tree: :mag: :sparkles: add test for tree with all not show self
Signed-off-by: zwPapEr <zw.paper@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/integration.rs b/tests/integration.rs index 4fe280e..8d34eb6 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -415,6 +415,24 @@ fn test_tree() { } #[test] +fn test_tree_all_not_show_self() { + let tmp = tempdir(); + tmp.child("one").touch().unwrap(); + tmp.child("one.d").create_dir_all().unwrap(); + tmp.child("one.d/two").touch().unwrap(); + tmp.child("one.d/.hidden").touch().unwrap(); + + cmd() + .arg(tmp.path()) + .arg("--tree") + .arg("--all") + .assert() + .stdout( + predicate::str::is_match("├── one\n└── one.d\n ├── .hidden\n └── two\n$").unwrap(), + ); +} + +#[test] fn test_tree_d() { let tmp = tempdir(); tmp.child("one").touch().unwrap(); |