From: Junio C Hamano Date: Sun, 26 Feb 2012 22:39:29 GMT Subject: Re: [PATCH] grep -P: Fix matching ^ and $ Message-ID: <7vlinpdxsu.fsf@alter.siamese.dyndns.org> In-Reply-To: <1330161868-7954-1-git-send-email-michal.kiedrowicz@gmail.com> MichaƂ Kiedrowicz writes: > @@ -893,4 +900,20 @@ test_expect_success 'mimic ack-grep --group' ' > test_cmp expected actual > ' > > +cat >expected < +space: line with leading space1 > +space: line with leading space2 > +space: line with leading space3 > +EOF > + > +test_expect_success 'grep -E "^ "' ' > + git grep -E "^ " space >actual && > + test_cmp expected actual > +' > + > +test_expect_success "grep -P '^ '" ' > + git grep -P "^ " space >actual && > + test_cmp expected actual > +' This test does not pass for me as I do not usually build with pcre; shouldn't it be protected with some test prerequisite? Otherwise the patch looks good; thanks.