mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Refactor tests
Make use of the 'is' more to test the entire output. Add test for no_color mode. Replace several calls to format_string with calls that build a string directly. I feel format_string is becoming unweildly and this simplfies the tests
This commit is contained in:
+2
-3
@@ -101,7 +101,6 @@ fn main() {
|
||||
}
|
||||
|
||||
let use_apparent_size = options.is_present("display_apparent_size");
|
||||
let use_full_path = options.is_present("display_full_paths");
|
||||
|
||||
let simplified_dirs = simplify_dir_names(target_dirs);
|
||||
let (permissions, nodes) = get_dir_tree(&simplified_dirs, use_apparent_size, threads);
|
||||
@@ -116,9 +115,9 @@ fn main() {
|
||||
|
||||
draw_it(
|
||||
permissions,
|
||||
use_full_path,
|
||||
options.is_present("display_full_paths"),
|
||||
options.is_present("reverse"),
|
||||
!options.is_present("no_colors"),
|
||||
options.is_present("no_colors"),
|
||||
tree,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user