summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-29 14:59:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-29 14:59:50 -0700
commit8e105e3928fccb8038a542ee7fb5986b7ec48eb9 (patch)
tree8e59fc51dd20002b7c3759d5eab7cd40fba87a0d /t
parentt9120: don't expect failure with SVN_HTTPD_PORT unset (diff)
parentgrep: fix word-regexp at the beginning of lines (diff)
downloadtgif-8e105e3928fccb8038a542ee7fb5986b7ec48eb9.tar.xz
Merge branch 'rs/maint-grep-word-regexp-fix'
* rs/maint-grep-word-regexp-fix: grep: fix word-regexp at the beginning of lines
Diffstat (limited to 't')
-rwxr-xr-xt/t7002-grep.sh9
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