diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index ae5290ab43e8b51b32331768371e2a67d700064d..abd14bf819f5c60fc1b9dc758c04974bd24b10a4 100755 (executable)
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
{
printf("Hello world.\n");
return 0;
+ /* char ?? */
}
EOF
test_cmp expected actual
'
+test_expect_success 'grep should ignore GREP_OPTIONS' '
+ GREP_OPTIONS=-v git grep " mmap bar\$" >actual &&
+ test_cmp expected actual
+'
+
test_expect_success 'grep -f, non-existent file' '
test_must_fail git grep -f patterns
'
)
'
+cat >expected <<EOF
+hello.c:int main(int argc, const char **argv)
+EOF
+
+test_expect_success 'grep -Fi' '
+ git grep -Fi "CHAR *" >actual &&
+ test_cmp expected actual
+'
+
test_done