feature: --files-only -F

Add feature to only show files skipping directories.
This commit is contained in:
andy.boot
2023-01-28 17:54:02 +00:00
parent 520c439edc
commit 1495251ebc
11 changed files with 81 additions and 22 deletions

View File

@@ -117,6 +117,15 @@ pub fn test_show_files_by_type() {
assert!(output.contains("┌─┴ (total)"));
}
#[test]
#[cfg(target_family = "unix")]
pub fn test_show_files_only() {
let output = build_command(vec!["-c", "-F", "tests/test_dir"]);
assert!(output.contains("tests/test_dir/many/a_file"));
assert!(output.contains("tests/test_dir/many/hello_file"));
assert!(!output.contains("tests/test_dir/many "));
}
#[test]
pub fn test_output_skip_total() {
let output = build_command(vec![