3 test_description
='diff hunk fusing'
20 4) hunks
=$4; cmd
="diff -U$3";;
21 5) hunks
=$5; cmd
="diff -U$3 --inter-hunk-context=$4";;
23 label
="$cmd, $1 common $2"
25 expected
=expected.
$file.
$3.
$hunks
31 git commit
-q -m.
$file
35 test_expect_success
"$label: count hunks ($hunks)" "
36 test $(git $cmd $file | grep '^@@ ' | wc -l) = $hunks
40 test_expect_success
"$label: check output" "
41 git $cmd $file | grep -v '^index ' >actual &&
42 test_cmp $expected actual
46 cat <<EOF >expected.f1.0.1 || exit 1
58 cat <<EOF >expected.f1.0.2 || exit 1
70 # common lines ctx intrctx hunks