From a7120b949c1853eed655e3b2efa166d2c6a1452c Mon Sep 17 00:00:00 2001 From: "andy.boot" Date: Thu, 18 Aug 2022 14:24:20 +0100 Subject: [PATCH] Tests: Add test to verify skip-total flag --- tests/test_flags.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_flags.rs b/tests/test_flags.rs index 981c358..ad8c571 100644 --- a/tests/test_flags.rs +++ b/tests/test_flags.rs @@ -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