batgrep: Add test for searching from stdin contents (#42)

This commit is contained in:
Ethan P 2020-10-28 19:04:52 -07:00
parent de60ea0c10
commit 40a66d934d
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,7 @@
────────────────────────────────────────────────────────────────────────────────
cat
dog
car
frog
fox
────────────────────────────────────────────────────────────────────────────────

View File

@ -92,3 +92,13 @@ test:option_context() {
batgrep -C 0 '\$' file.txt
}
test:search_from_stdin() {
description "Should be able to search through stdin."
snapshot stdout
snapshot stderr
require_rg
cat file.txt | batgrep "^ca"
}