Debian Codegraph @

tests/flip10/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 EOF
15
16 cat << EOF > patch2
17 --- file.orig
18 +++ file
19 @@ -10 +10 @@
20 -a
21 +A
22 --- unrelated.orig
23 +++ unrelated
24 @@ -1 +1 @@
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 --- unrelated.orig
38 +++ unrelated
39 @@ -1 +1 @@
40 -a
41 +A
42
43 === 8< === cut here === 8< ===
44
45 --- file.orig
46 +++ file
47 @@ -1 +1 @@
48 -a
49 +A
50 EOF