summaryrefslogtreecommitdiff
path: root/t/t7810-grep.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-25 19:04:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-25 19:04:19 (GMT)
commitfca9e0013eeaad45bff38f66667d2791a1edc53f (patch)
treeb487bf942d747ec16185d361b9249eb5034b7ca4 /t/t7810-grep.sh
parent4f64464023d0bf7ce065f1dccaf267ca38b3521f (diff)
parentec83061156e18ce600384d3c57f90729a9295488 (diff)
downloadgit-fca9e0013eeaad45bff38f66667d2791a1edc53f.zip
git-fca9e0013eeaad45bff38f66667d2791a1edc53f.tar.gz
git-fca9e0013eeaad45bff38f66667d2791a1edc53f.tar.bz2
Merge branch 'rs/maint-grep-F'
"git grep -e '$pattern'", unlike the case where the patterns are read from a file, did not treat individual lines in the given pattern argument as separate regular expressions as it should.
Diffstat (limited to 't/t7810-grep.sh')
-rwxr-xr-xt/t7810-grep.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index d9ad633..24e9b19 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -351,6 +351,11 @@ test_expect_success 'grep -f, multiple patterns' '
test_cmp expected actual
'
+test_expect_success 'grep, multiple patterns' '
+ git grep "$(cat patterns)" >actual &&
+ test_cmp expected actual
+'
+
cat >expected <<EOF
file:foo mmap bar
file:foo_mmap bar