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