Debian Codegraph @

tests/edit7/run-test

raw
1 #!/bin/sh
2
3 # This is a rediff(1) testcase.
4 # Test: Pass through extra stuff.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > original-patch
10 This is the patch I want to apply:
11
12 --- file.orig
13 +++ file
14 @@ -6,7 +6,7
15 blah
16 blah
17 blah
18 -not
19 +important
20 blah
21 blah
22 blah
23
24 Oh, and this one:
25
26 --- unchanged.orig
27 +++ unchanged
28 @@ -37,6 +37,7 @@
29 blah
30 blah
31 blah
32 +blah
33 blah
34 blah
35 blah
36
37 Okay?
38
39 Hope so.
40 EOF
41 sed -e 's/-not$/+very/' original-patch > edited-patch
42
43 ${REDIFF} original-patch edited-patch 2>errors >rediffed-patch || exit 1
44 [ -s errors ] && exit 1
45 cat << EOF | cmp - rediffed-patch || exit 1
46 This is the patch I want to apply:
47
48 --- file.orig
49 +++ file
50 @@ -6,6 +6,8 @@
51 blah
52 blah
53 blah
54 +very
55 +important
56 blah
57 blah
58 blah
59
60 Oh, and this one:
61
62 --- unchanged.orig
63 +++ unchanged
64 @@ -37,6 +37,7 @@
65 blah
66 blah
67 blah
68 +blah
69 blah
70 blah
71 blah
72
73 Okay?
74
75 Hope so.
76 EOF