summaryrefslogtreecommitdiff
path: root/tests/t0400-grep.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t0400-grep.sh')
-rwxr-xr-xtests/t0400-grep.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/t0400-grep.sh b/tests/t0400-grep.sh
index 206377f..b244cf4 100755
--- a/tests/t0400-grep.sh
+++ b/tests/t0400-grep.sh
@@ -18,4 +18,16 @@ test_expect_success 'Make sure grep prints normal lines' '
grep -q "They are" <<<"$results"
'
+test_expect_success 'Test passing the "-i" option to grep' '
+ "$PASS" init $KEY1 &&
+ "$PASS" insert -e blah1 <<<"I wonder..." &&
+ "$PASS" insert -e blah2 <<<"Will it ignore" &&
+ "$PASS" insert -e blah3 <<<"case when searching?" &&
+ "$PASS" insert -e folder/blah4 <<<"Yes, it does. Wonderful!" &&
+ results="$("$PASS" grep -i wonder)" &&
+ [[ $(wc -l <<<"$results") -eq 4 ]] &&
+ grep -q blah1 <<<"$results" &&
+ grep -q blah4 <<<"$results"
+'
+
test_done