summaryrefslogtreecommitdiff
path: root/t/t7002-grep.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-01-28 12:33:42 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-28 12:33:42 -0800
commit4ff61c21de519b4b3c9569b354fa5a3905b69c6a (patch)
tree1b0829332583d5d39eeaaee2a1b566edc3504df1 /t/t7002-grep.sh
parentreject @{-1} not at beginning of object name (diff)
downloadtgif-4ff61c21de519b4b3c9569b354fa5a3905b69c6a.tar.xz
grep --quiet: finishing touches
Name the option "--quiet" not "--quick", document it, and add tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7002-grep.sh')
-rwxr-xr-xt/t7002-grep.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index 7eceb086be..bf4d4dcb2b 100755
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
@@ -291,6 +291,14 @@ y:y yy
z:zzz
EOF
+test_expect_success 'grep -q, silently report matches' '
+ >empty &&
+ git grep -q mmap >actual &&
+ test_cmp empty actual &&
+ test_must_fail git grep -q qfwfq >actual &&
+ test_cmp empty actual
+'
+
# Create 1024 file names that sort between "y" and "z" to make sure
# the two files are handled by different calls to an external grep.
# This depends on MAXARGS in builtin-grep.c being 1024 or less.