Debian Codegraph @

tests/delhunk5/run-test

raw
1 #!/bin/sh
2
3 # This is a rediff(1) testcase.
4 # Test: Remove one hunk and edit the offset banner of the next.
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 EOF
19
20 cat << EOF > edited-patch
21 --- file.orig
22 +++ file
23 @@ -25,1 +20,1 @@
24 -a
25 +b
26 EOF
27
28 ${REDIFF} original-patch edited-patch 2>errors >rediffed-patch || exit 1
29 [ -s errors ] && exit 1
30 cat << EOF | cmp - rediffed-patch || exit 1
31 --- file.orig
32 +++ file
33 @@ -25 +25 @@
34 -a
35 +b
36 EOF