2005-06-22 09:30:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2005 Junio C Hamano
|
|
|
|
#
|
|
|
|
|
2008-06-27 17:43:09 +00:00
|
|
|
test_description='git apply --stat --summary test, with --recount
|
2005-06-22 09:30:47 +00:00
|
|
|
|
|
|
|
'
|
|
|
|
. ./test-lib.sh
|
|
|
|
|
2008-06-27 17:43:09 +00: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 04:54:05 +00:00
|
|
|
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
|
2008-06-27 17:43:09 +00: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 04:54:05 +00:00
|
|
|
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
|
2008-06-27 17:43:09 +00:00
|
|
|
'
|
|
|
|
done <<\EOF
|
|
|
|
rename
|
|
|
|
copy
|
|
|
|
rewrite
|
|
|
|
mode
|
|
|
|
non git (1)
|
|
|
|
non git (2)
|
|
|
|
non git (3)
|
2008-07-04 19:10:14 +00:00
|
|
|
incomplete (1)
|
|
|
|
incomplete (2)
|
2008-06-27 17:43:09 +00:00
|
|
|
EOF
|
2005-06-22 09:30:47 +00:00
|
|
|
|
|
|
|
test_done
|