Skip to content

Commit 6c7f4ce

Browse files
author
Junio C Hamano
committed
t/t4013: fix futzing with the version string.
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40aaae8 commit 6c7f4ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t4013-diff-various.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ test_expect_success setup '
8888
+*+ [initial] Initial
8989
EOF
9090

91-
V=`git version | sed -e 's/^git version //'`
91+
V=`git version | sed -e 's/^git version //' -e 's/\./\\./g'`
9292
while read cmd
9393
do
9494
case "$cmd" in
@@ -103,7 +103,9 @@ do
103103
test_expect_success "git $cmd" '
104104
{
105105
echo "\$ git $cmd"
106-
git $cmd | sed -e "s/$V/g-i-t--v-e-r-s-i-o-n/"
106+
git $cmd |
107+
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
108+
-e "s/^\\( *boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
107109
echo "\$"
108110
} >"$actual" &&
109111
if test -f "$expect"

0 commit comments

Comments
 (0)