diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-01-31 22:01:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-31 22:01:15 -0800 |
commit | 3e9e41659394fe5de085c90f4f86858062dfa47d (patch) | |
tree | cce6f05b79900447ee4d56067ef9da7376b449f0 /t/t7810-grep.sh | |
parent | fc75ad72dc7955d3077db4a72818d24de007a582 (diff) | |
parent | 50dd0f2fd910d9973760db052897ee8e73ed2f1f (diff) | |
download | git-3e9e41659394fe5de085c90f4f86858062dfa47d.tar.gz git-3e9e41659394fe5de085c90f4f86858062dfa47d.tar.xz |
Merge branch 'tr/grep-l-with-decoration'
* tr/grep-l-with-decoration:
grep: fix -l/-L interaction with decoration lines
Diffstat (limited to 't/t7810-grep.sh')
-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 7ba5b16f9..75f4716d8 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 |