diff options
author | andy.boot <bootandy@gmail.com> | 2022-08-18 14:24:20 +0100 |
---|---|---|
committer | andy.boot <bootandy@gmail.com> | 2022-08-18 15:22:10 +0100 |
commit | a7120b949c1853eed655e3b2efa166d2c6a1452c (patch) | |
tree | 14d51f0734599355014b7619caaa9ac45207df16 | |
parent | 812e1e3c535fc08abf45f2aab1049a8f0c669e96 (diff) |
Tests: Add test to verify skip-total flag
-rw-r--r-- | tests/test_flags.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -113,6 +113,17 @@ pub fn test_show_files_by_type() { } #[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 let output = build_command(vec!["-c", "-e", "\\.rs$", "tests"]); |