display/tree: 🔍 add test and changelog for show edge before name

Signed-off-by: zwPapEr <zw.paper@gmail.com>
This commit is contained in:
zwPapEr
2021-02-16 00:49:52 +08:00
committed by Abin Simon
parent 7f3d4ff9e2
commit 072a9bd756
3 changed files with 68 additions and 0 deletions

View File

@@ -447,6 +447,20 @@ fn test_tree_all_not_show_self() {
);
}
#[test]
fn test_tree_show_edge_before_name() {
let tmp = tempdir();
tmp.child("one.d").create_dir_all().unwrap();
tmp.child("one.d/two").touch().unwrap();
cmd()
.arg(tmp.path())
.arg("--tree")
.arg("--long")
.assert()
.stdout(predicate::str::is_match("└── two\n$").unwrap());
}
#[test]
fn test_tree_d() {
let tmp = tempdir();