diff --git a/tests/tests.rs b/tests/tests.rs index 7b703cc..1593811 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -368,3 +368,20 @@ pub fn test_hidden_flag() { let output = str::from_utf8(&output).unwrap(); assert!(!output.contains(".hidden_file")); } + +#[test] +pub fn test_number_of_files() { + // Check we can see the hidden file normally + let mut cmd = Command::cargo_bin("dust").unwrap(); + let output = cmd + .arg("-c") + .arg("-f") + .arg("tests/test_dir") + .unwrap() + .stdout; + let output = str::from_utf8(&output).unwrap(); + assert!(output.contains("1 ┌── hello_file")); + assert!(output.contains("1 ├── a_file ")); + assert!(output.contains("3 ┌─┴ many")); + assert!(output.contains("4 ┌─┴ test_dir")); +}