git-grep: Fix problems with recently added tests
commitd0042abe14b3aece87595d365d6eba84c3e53327
authorMichał Kiedrowicz <michal.kiedrowicz@gmail.com>
Thu, 26 May 2011 22:43:59 +0000 (27 00:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 May 2011 06:58:50 +0000 (29 23:58 -0700)
treeeb324e1b9d5f1fb3792db2f7142e9cf9cc0dcea8
parentf556e4af2790bc8f0918093bd2b3053c7d2898dc
git-grep: Fix problems with recently added tests

Brian Gernhardt reported that test 'git grep -E -F -G a\\+b' fails on
OS X 10.6.7. This is because I assumed \+ is part of BRE, which isn't
true on all platforms.

The easiest way to make this test pass is to just update expected
output, but that would make the test pointless. Its real purpose is to
check whether 'git grep -E -F -G' is different from 'git grep -E -G -F'.
To check that, let's change pattern to "a+b*c". This should return
different match for -G, -F and -E.

I also made two small tweaks to the tests. First, I added path "ab" to
all calls to future-proof tests. Second, I updated last two tests to
better show that 'git grep -P -E' is different from 'git grep -E -P'.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7810-grep.sh