2005-06-22 13:30:47 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2005 Junio C Hamano
|
|
|
|
#
|
|
|
|
|
2008-06-27 21:43:09 +04:00
|
|
|
test_description='git apply --stat --summary test, with --recount
|
2005-06-22 13:30:47 +04:00
|
|
|
|
|
|
|
'
|
|
|
|
. ./test-lib.sh
|
|
|
|
|
2008-06-27 21:43:09 +04:00
|
|
|
UNC='s/^\(@@ -[1-9][0-9]*\),[0-9]* \(+[1-9][0-9]*\),[0-9]* @@/\1,999 \2,999 @@/'
|
|
|
|
|
|
|
|
num=0
|
|
|
|
while read title
|
|
|
|
do
|
|
|
|
num=$(( $num + 1 ))
|
|
|
|
test_expect_success "$title" '
|
|
|
|
git apply --stat --summary \
|
|
|
|
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
|
2012-03-13 08:54:05 +04:00
|
|
|
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
|
2008-06-27 21:43:09 +04:00
|
|
|
'
|
|
|
|
|
|
|
|
test_expect_success "$title with recount" '
|
|
|
|
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
|
|
|
|
git apply --recount --stat --summary >current &&
|
2012-03-13 08:54:05 +04:00
|
|
|
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
|
2008-06-27 21:43:09 +04:00
|
|
|
'
|
|
|
|
done <<\EOF
|
|
|
|
rename
|
|
|
|
copy
|
|
|
|
rewrite
|
|
|
|
mode
|
|
|
|
non git (1)
|
|
|
|
non git (2)
|
|
|
|
non git (3)
|
2008-07-04 23:10:14 +04:00
|
|
|
incomplete (1)
|
|
|
|
incomplete (2)
|
2008-06-27 21:43:09 +04:00
|
|
|
EOF
|
2005-06-22 13:30:47 +04:00
|
|
|
|
|
|
|
test_done
|