Tests: Add test to verify skip-total flag

This commit is contained in:
andy.boot
2022-08-18 14:24:20 +01:00
parent 812e1e3c53
commit a7120b949c

View File

@@ -112,6 +112,17 @@ pub fn test_show_files_by_type() {
assert!(output.contains("┌─┴ (total)"));
}
#[test]
pub fn test_output_skip_total() {
let output = build_command(vec![
"--skip-total",
"tests/test_dir/many/hello_file",
"tests/test_dir/many/a_file",
]);
assert!(output.contains("hello_file"));
assert!(!output.contains("(total)"));
}
#[test]
pub fn test_show_files_by_regex_match_lots() {
// Check we can see '.rs' files in the tests directory