Debian Codegraph @

tests/preserve1/run-test

raw
1 #!/bin/sh
2
3 # This is a filterdiff(1) testcase.
4 # Test: Preserve text after '@@' in unified input.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > diff
10 --- file.orig
11 +++ file
12 @@ -0,0 +1 @@ line 1
13 +a
14 @@ -5 +6 @@ line 6
15 -a
16 +b
17 @@ -9 +10 @@ line 10
18 -a
19 +b
20 EOF
21
22 ${FILTERDIFF} -#2,3 diff 2>errors >filtered || exit 1
23 [ -s errors ] && exit 1
24
25 cat << EOF | cmp - filtered || exit 1
26 --- file.orig
27 +++ file
28 @@ -5 +5 @@ line 6
29 -a
30 +b
31 @@ -9 +9 @@ line 10
32 -a
33 +b
34 EOF