mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Rethink colors
Use LS_COLORS to print default color of each file or folder Keep showing largest sub folder in red.
This commit is contained in:
+12
-4
@@ -7,13 +7,21 @@ pub fn test_basic_output() {
|
||||
assert_cli::Assert::main_binary()
|
||||
.with_args(&["src/test_dir/"])
|
||||
.stdout()
|
||||
.contains(" ┌─┴ test_dir ")
|
||||
.contains(" ┌─┴ ")
|
||||
.stdout()
|
||||
.contains(" ┌─┴ many ")
|
||||
.contains("test_dir ")
|
||||
.stdout()
|
||||
.contains(" ├── hello_file")
|
||||
.contains(" ┌─┴ ")
|
||||
.stdout()
|
||||
.contains(" ┌── a_file ")
|
||||
.contains("many ")
|
||||
.stdout()
|
||||
.contains(" ├── ")
|
||||
.stdout()
|
||||
.contains("hello_file")
|
||||
.stdout()
|
||||
.contains(" ┌── ")
|
||||
.stdout()
|
||||
.contains("a_file ")
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ pub fn test_soft_sym_link() {
|
||||
let a = format!("─┴ {}", dir_s);
|
||||
|
||||
assert_cli::Assert::main_binary()
|
||||
.with_args(&["-p", &dir_s])
|
||||
.with_args(&["-p", "-c", &dir_s])
|
||||
.stdout()
|
||||
.contains(a.as_str())
|
||||
.stdout()
|
||||
@@ -72,7 +72,7 @@ pub fn test_hard_sym_link() {
|
||||
// we cannot guarantee which version will appear first.
|
||||
let result = panic::catch_unwind(|| {
|
||||
assert_cli::Assert::main_binary()
|
||||
.with_args(&["-p", dir_s])
|
||||
.with_args(&["-p", "-c", dir_s])
|
||||
.stdout()
|
||||
.contains(a.as_str())
|
||||
.stdout()
|
||||
@@ -81,7 +81,7 @@ pub fn test_hard_sym_link() {
|
||||
});
|
||||
if result.is_err() {
|
||||
assert_cli::Assert::main_binary()
|
||||
.with_args(&["-p", dir_s])
|
||||
.with_args(&["-p", "-c", dir_s])
|
||||
.stdout()
|
||||
.contains(a.as_str())
|
||||
.stdout()
|
||||
@@ -110,7 +110,7 @@ pub fn test_recursive_sym_link() {
|
||||
let b = format!(" └── {}", link_name_s);
|
||||
|
||||
assert_cli::Assert::main_binary()
|
||||
.with_args(&["-r", "-p", dir_s])
|
||||
.with_args(&["-c", "-r", "-p", dir_s])
|
||||
.stdout()
|
||||
.contains(a.as_str())
|
||||
.stdout()
|
||||
|
||||
Reference in New Issue
Block a user