diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t7810-grep.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 81263b7851..7ba5b16f99 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -523,6 +523,20 @@ test_expect_success 'grep -W' ' test_cmp expected actual ' +cat >expected <<EOF +hello.c= printf("Hello world.\n"); +hello.c: return 0; +hello.c- /* char ?? */ +EOF + +test_expect_success 'grep -W with userdiff' ' + test_when_finished "rm -f .gitattributes" && + git config diff.custom.xfuncname "(printf.*|})$" && + echo "hello.c diff=custom" >.gitattributes && + git grep -W return >actual && + test_cmp expected actual +' + test_expect_success 'grep from a subdirectory to search wider area (1)' ' mkdir -p s && ( |