Debian Codegraph @

tests/delhunk4/run-test

raw
1 #!/bin/sh
2
3 # This is a rediff(1) testcase.
4 # Test: Remove two consecutive hunks.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > original-patch
10 --- file.orig
11 +++ file
12 @@ -10 +10 @@
13 -a
14 +b
15 @@ -20 +20 @@
16 -a
17 +b
18 @@ -30 +30 @@
19 -a
20 +b
21 EOF
22
23 cat << EOF > edited-patch
24 --- file.orig
25 +++ file
26 @@ -30 +30 @@
27 -a
28 +b
29 EOF
30
31 ${REDIFF} original-patch edited-patch 2>errors >rediffed-patch || exit 1
32 [ -s errors ] && exit 1
33 cat << EOF | cmp - rediffed-patch || exit 1
34 --- file.orig
35 +++ file
36 @@ -30 +30 @@
37 -a
38 +b
39 EOF