mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-20 11:47:43 +02:00
batgrep: Add test for searching from stdin contents (#42)
This commit is contained in:
parent
de60ea0c10
commit
40a66d934d
@ -0,0 +1,7 @@
|
||||
────────────────────────────────────────────────────────────────────────────────
|
||||
cat
|
||||
dog
|
||||
car
|
||||
frog
|
||||
fox
|
||||
────────────────────────────────────────────────────────────────────────────────
|
@ -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"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user