Debian Codegraph @

tests/rediff3/run-test

raw
1 #!/bin/sh
2
3 # This is a rediff(1) testcase.
4 # Test: Adjust offsets correctly
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << "EOF" > patch.orig
10 --- /tmp/a 2019-11-28 12:34:20.222622166 +0000
11 +++ /tmp/b 2019-11-28 12:34:51.932803492 +0000
12 @@ -1,7 +1,7 @@
13 1
14 -2
15 +3
16 3
17 4
18 5
19 6
20 -7
21 +8
22 EOF
23
24 cat << "EOF" > patch.mod
25 --- /tmp/a 2019-11-28 12:34:20.222622166 +0000
26 +++ /tmp/b 2019-11-28 12:34:51.932803492 +0000
27 @@ -1,7 +1,7 @@
28 4
29 5
30 6
31 -7
32 +8
33 EOF
34
35 ${REDIFF} patch.orig patch.mod > patch-rediffed || exit 1
36 cmp - patch-rediffed << "EOF" || exit 1
37 --- /tmp/a 2019-11-28 12:34:20.222622166 +0000
38 +++ /tmp/b 2019-11-28 12:34:51.932803492 +0000
39 @@ -4,4 +4,4 @@
40 4
41 5
42 6
43 -7
44 +8
45 EOF
46