Debian Codegraph @

tests/select9/run-test

raw
1 #!/bin/sh
2
3 # This is a filterdiff(1) testcase.
4 # Test: Unified format, --as-numbered-lines=after
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > patch
10 --- a.orig
11 +++ a
12 @@ -1 +1 @@
13 -a
14 +b
15 --- b.orig
16 +++ b
17 @@ -2 +2,2 @@
18 -a
19 +b
20 +c
21 @@ -50 +51 @@
22 -a
23 +b
24 --- c.orig
25 +++ c
26 @@ -3 +3 @@
27 -a
28 +b
29 EOF
30
31 ${FILTERDIFF} --as-numbered-lines=after -i b -#1 <patch >selected 2>errors || exit 1
32 [ -s errors ] && exit 1
33
34 cat << EOF | cmp - selected || exit 1
35 +++ b
36 2 :b
37 3 :c
38 EOF