X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7810-grep.sh;h=d9ad633310a19a9ebbc2e5024875278d4631129e;hb=b1d645b58ac6c96ffdc8d9a01f0b44a10deb43f9;hp=75f4716d8cbca0c295668e181a557b186cb37432;hpb=fd1727f5fa1ca1817eee36f99c9245dc2217ecac;p=git.git diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 75f4716d8..d9ad63331 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -47,6 +47,13 @@ test_expect_success setup ' echo vvv >t/v && mkdir t/a && echo vvv >t/a/v && + { + echo "line without leading space1" + echo " line with leading space1" + echo " line with leading space2" + echo " line with leading space3" + echo "line without leading space2" + } >space && git add . && test_tick && git commit -m initial @@ -893,4 +900,20 @@ test_expect_success 'mimic ack-grep --group' ' test_cmp expected actual ' +cat >expected <actual && + test_cmp expected actual +' + +test_expect_success LIBPCRE 'grep -P "^ "' ' + git grep -P "^ " space >actual && + test_cmp expected actual +' + test_done