Refactor code

This commit is contained in:
bootandy
2018-04-07 13:52:59 +01:00
parent b3b1a867c4
commit 74b9178017
2 changed files with 68 additions and 51 deletions
+10 -1
View File
@@ -41,12 +41,21 @@ fn main_output() -> String {
{}
{}",
format_string("src/test_dir", true, " 8.0K", ""),
format_string("src/test_dir/many", true, " 8.0K", "└─┬",),
format_string("src/test_dir/many", true, " 4.0K", "└─┬",),
format_string("src/test_dir/many/hello_file", true, " 4.0K", " ├──",),
format_string("src/test_dir/many/a_file", false, " 0B", " └──",),
)
}
#[test]
pub fn test_main_extra_slash() {
assert_cli::Assert::main_binary()
.with_args(&["src/test_dir/"])
.stdout()
.is(main_output())
.unwrap();
}
#[test]
pub fn test_apparent_size() {
let r = format!(