Debian Codegraph @

tests/recount4/run-test

raw
1 #!/bin/sh
2
3 # This is a recountdiff(1) testcase.
4 # Test: Test that empty hunks work.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > patch
10 --- file
11 +++ file
12 @@ -1 +1 @@
13 -1
14 @@ -10 +10 @@
15 -1
16 +1
17 --- otherfile
18 +++ otherfile
19 @@ -1 +1 @@
20 +2
21 @@ -10 +10 @@
22 -1
23 +1
24 EOF
25
26 ${RECOUNTDIFF} patch > patch-recounted || exit 1
27 cat << EOF | cmp - patch-recounted || exit 1
28 --- file
29 +++ file
30 @@ -1 +0,0 @@
31 -1
32 @@ -10 +9 @@
33 -1
34 +1
35 --- otherfile
36 +++ otherfile
37 @@ -0,0 +1 @@
38 +2
39 @@ -10 +11 @@
40 -1
41 +1
42 EOF