diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-10 13:59:02 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-10 13:59:02 -0800 |
commit | 184a7aa7bf8e42ce9aba12b92d9cf8014d04a947 (patch) | |
tree | 625805572842c984cc7600e4880fdff4549e6558 /t | |
parent | 5febbda4e7afb4f26bed9d2dc5f9c4ceca86d2b8 (diff) | |
parent | 50dd0f2fd910d9973760db052897ee8e73ed2f1f (diff) | |
download | git-184a7aa7bf8e42ce9aba12b92d9cf8014d04a947.tar.gz |
Merge branch 'tr/grep-l-with-decoration' into maint
* tr/grep-l-with-decoration:
grep: fix -l/-L interaction with decoration lines
Diffstat (limited to 't')
-rwxr-xr-x | t/t7810-grep.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh index 7ba5b16f99..75f4716d8c 100755 --- a/t/t7810-grep.sh +++ b/t/t7810-grep.sh @@ -246,6 +246,28 @@ do done cat >expected <<EOF +file +EOF +test_expect_success 'grep -l -C' ' + git grep -l -C1 foo >actual && + test_cmp expected actual +' + +cat >expected <<EOF +file:5 +EOF +test_expect_success 'grep -l -C' ' + git grep -c -C1 foo >actual && + test_cmp expected actual +' + +test_expect_success 'grep -L -C' ' + git ls-files >expected && + git grep -L -C1 nonexistent_string >actual && + test_cmp expected actual +' + +cat >expected <<EOF file:foo mmap bar_mmap EOF |