diff options
Diffstat (limited to 't/t7002-grep.sh')
-rwxr-xr-x | t/t7002-grep.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index ae5290ab43..abd14bf819 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -14,6 +14,7 @@ int main(int argc, const char **argv) { printf("Hello world.\n"); return 0; + /* char ?? */ } EOF @@ -213,6 +214,11 @@ test_expect_success 'grep -e A --and --not -e B' ' 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 ' @@ -411,4 +417,13 @@ test_expect_success 'grep from a subdirectory to search wider area (2)' ' ) ' +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 |