diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-06-02 07:48:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-02 07:48:09 -0700 |
commit | 3489428367e0d9d95cf90a8a7f537db958f9a78a (patch) | |
tree | de2344f45f03a01a3e89f20ebdd1e31dcb12eb30 /t | |
parent | b91ffd37d5c18046f7b0bf47e939273bead9e52e (diff) | |
parent | 1f5b9cc40e80a8a7902236a26844be138887b1d9 (diff) | |
download | git-3489428367e0d9d95cf90a8a7f537db958f9a78a.tar.gz |
Merge branch 'rs/maint-grep-word-regexp-fix' into maint
* rs/maint-grep-word-regexp-fix:
grep: fix colouring of matches with zero length
grep: fix word-regexp at the beginning of lines
Diffstat (limited to 't')
-rwxr-xr-x | t/t7002-grep.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index b81593780a..f275af8240 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -16,12 +16,13 @@ test_expect_success setup ' echo foo mmap bar_mmap echo foo_mmap bar mmap baz } >file && + echo ww w >w && echo x x xx x >x && echo y yy >y && echo zzz > z && mkdir t && echo test >t/t && - git add file x y z t/t && + git add file w x y z t/t && test_tick && git commit -m initial ' @@ -48,6 +49,12 @@ do diff expected actual ' + test_expect_success "grep -w $L (w)" ' + : >expected && + ! git grep -n -w -e "^w" >actual && + test_cmp expected actual + ' + test_expect_success "grep -w $L (x)" ' { echo ${HC}x:1:x x xx x |