Debian Codegraph @

tests/flip11/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 @@ -1 +1 @@
12 -a
13 +A
14 --- unrelated.orig
15 +++ unrelated
16 @@ -1 +1 @@
17 -a
18 +A
19 EOF
20
21 cat << EOF > patch2
22 --- file.orig
23 +++ file
24 @@ -10 +10 @@
25 -a
26 +A
27 EOF
28
29 ${FLIPDIFF} patch1 patch2 > patch-flipped || exit 1
30 sed -e "s/$(printf '\t').*$//" patch-flipped > patch-cmp
31 cmp - patch-cmp << EOF || exit 1
32 --- file.orig
33 +++ file
34 @@ -10 +10 @@
35 -a
36 +A
37
38 === 8< === cut here === 8< ===
39
40 --- file.orig
41 +++ file
42 @@ -1 +1 @@
43 -a
44 +A
45 --- unrelated.orig
46 +++ unrelated
47 @@ -1 +1 @@
48 -a
49 +A
50 EOF