diff options
Diffstat (limited to 'tests/tests.rs')
-rw-r--r-- | tests/tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index bdafb298..66c2e51c 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -339,6 +339,14 @@ sherlock!(files_with_matches, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { assert_eq!(lines, expected); }); +sherlock!(files_without_matches, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { + wd.create("file.py", "foo"); + cmd.arg("--files-without-matches"); + let lines: String = wd.stdout(&mut cmd); + let expected = "file.py\n"; + assert_eq!(lines, expected); +}); + sherlock!(after_context, |wd: WorkDir, mut cmd: Command| { cmd.arg("-A").arg("1"); let lines: String = wd.stdout(&mut cmd); @@ -1059,6 +1067,16 @@ sherlock!(feature_89_files_with_matches, "Sherlock", ".", }); // See: https://github.com/BurntSushi/ripgrep/issues/89 +sherlock!(feature_89_files_without_matches, "Sherlock", ".", +|wd: WorkDir, mut cmd: Command| { + wd.create("file.py", "foo"); + cmd.arg("--null").arg("--files-without-matches"); + + let lines: String = wd.stdout(&mut cmd); + assert_eq!(lines, "file.py\x00"); +}); + +// See: https://github.com/BurntSushi/ripgrep/issues/89 sherlock!(feature_89_count, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { cmd.arg("--null").arg("--count"); |