diff options
Diffstat (limited to 'tests/tests.rs')
-rw-r--r-- | tests/tests.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 0ee4995b..f3cc8f06 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -2191,3 +2191,33 @@ fn type_list() { // This can change over time, so just make sure we print something. assert!(!lines.is_empty()); } + +// See: https://github.com/BurntSushi/ripgrep/issues/948 +sherlock!( + exit_code_match_success, + ".", + ".", + |wd: WorkDir, mut cmd: Command| { + wd.assert_exit_code(0, &mut cmd); + } +); + +// See: https://github.com/BurntSushi/ripgrep/issues/948 +sherlock!( + exit_code_no_match, + "6d28e48b5224a42b167e{10}", + ".", + |wd: WorkDir, mut cmd: Command| { + wd.assert_exit_code(1, &mut cmd); + } +); + +// See: https://github.com/BurntSushi/ripgrep/issues/948 +sherlock!( + exit_code_error, + "*", + ".", + |wd: WorkDir, mut cmd: Command| { + wd.assert_exit_code(2, &mut cmd); + } +); |