1#!/bin/sh
2#
3# Copyright (c) 2005 Junio C Hamano
4#
56
test_description='git apply --stat --summary test, with --recount
78
'
9. ./test-lib.sh
1011
UNC='s/^\(@@ -[1-9][0-9]*\),[0-9]* \(+[1-9][0-9]*\),[0-9]* @@/\1,999 \2,999 @@/'
1213
num=0
14while read title
15do
16num=$(( $num + 1 ))
17test_expect_success "$title" '
18git apply --stat --summary \
19<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
20test_cmp ../t4100/t-apply-$num.expect current
21'
2223
test_expect_success "$title with recount" '
24sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
25git apply --recount --stat --summary >current &&
26test_cmp ../t4100/t-apply-$num.expect current
27'
28done <<\EOF
29rename
30copy
31rewrite
32mode
33non git (1)
34non git (2)
35non git (3)
36EOF
3738
test_done