Debian Codegraph @

tests/flip18/run-test

raw
1 #!/bin/sh
2
3 # This is a flipdiff(1) testcase.
4
5
6 . ${top_srcdir-.}/tests/common.sh
7
8 cat << EOF > patch1
9 --- file.orig
10 +++ file
11 @@ -5,7 +5,7 @@
12 Changed this.
13
14 Changed that.
15 -Borke it.
16 +Broke it.
17
18 Fixed it again.
19 Fixed it.
20 @@ -16,6 +16,7 @@
21 Blah
22 Blah
23 Blah
24 +Foo
25 Blah
26 Blah
27 Blah
28 EOF
29
30 cat << EOF > patch2
31 --- file.orig
32 +++ file
33 @@ -13,3 +13,3 @@
34 Blah
35 -blah
36 +Blah
37 Blah
38 EOF
39
40 ${FLIPDIFF} patch1 patch2 > patch-flipped || exit 1
41 sed -e "s/$(printf '\t').*$//" patch-flipped > patch-cmp
42 cmp - patch-flipped << EOF || exit 1
43 --- file.orig
44 +++ file
45 @@ -13,5 +13,5 @@
46 Blah
47 -blah
48 +Blah
49 Blah
50 Blah
51 Blah
52
53 === 8< === cut here === 8< ===
54
55 --- file.orig
56 +++ file
57 @@ -5,7 +5,7 @@
58 Changed this.
59
60 Changed that.
61 -Borke it.
62 +Broke it.
63
64 Fixed it again.
65 Fixed it.
66 @@ -16,6 +16,7 @@
67 Blah
68 Blah
69 Blah
70 +Foo
71 Blah
72 Blah
73 Blah
74 EOF