tests: add test for d0

Test to stop bug in previous commit occuring
Also cargo clippy
This commit is contained in:
andy.boot
2025-07-28 22:20:37 +01:00
parent 222cd83ff3
commit 3cce61f854
2 changed files with 24 additions and 18 deletions
+8
View File
@@ -62,6 +62,14 @@ pub fn test_d_flag_works() {
assert!(!output.contains("hello_file"));
}
#[test]
pub fn test_d0_works_on_multiple() {
// We should see the top level directory but not the sub dirs / files:
let output = build_command(vec!["-d", "0", "tests/test_dir/", "tests/test_dir2"]);
assert!(output.contains("test_dir "));
assert!(output.contains("test_dir2"));
}
#[test]
pub fn test_threads_flag_works() {
let output = build_command(vec!["-T", "1", "tests/test_dir/"]);