diff options
author | tiehuis <marctiehuis@gmail.com> | 2017-02-28 17:53:52 +1300 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-03-08 10:17:18 -0500 |
commit | 714ae822418e13b1084d377654b3419f22a51866 (patch) | |
tree | af54173d5af5712b8c53645e026e55d7548cb908 /tests | |
parent | 49fd6687120ef11192847ef47191bbc6d32a2ed9 (diff) |
Add `--max-filesize` option to cli
The --max-filesize option allows filtering files which are larger than
the specified limit. This is potentially useful if one is attempting to
search a number of large files without common file-types/suffixes.
See #369.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index aeacca54..fd60d672 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -432,6 +432,18 @@ sherlock!(context_line_numbers, "world|attached", assert_eq!(lines, expected); }); +sherlock!(max_filesize_parse_error_length, "Sherlock", ".", +|wd: WorkDir, mut cmd: Command| { + cmd.arg("--max-filesize").arg("44444444444444444444"); + wd.assert_err(&mut cmd); +}); + +sherlock!(max_filesize_parse_error_suffix, "Sherlock", ".", +|wd: WorkDir, mut cmd: Command| { + cmd.arg("--max-filesize").arg("45k"); + wd.assert_err(&mut cmd); +}); + sherlock!(ignore_hidden, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { wd.remove("sherlock"); wd.create(".sherlock", hay::SHERLOCK); |