Debian Codegraph @

tests/grepdiff2/run-test

raw
1 #!/bin/sh
2
3 # This is a grepdiff(1) testcase.
4
5
6 . ${top_srcdir-.}/tests/common.sh
7
8 cat << EOF > diff
9 --- file1
10 +++ file1
11 @@ -0,0 +1 @@
12 ++a
13 --- orig/file2
14 +++ file2
15 @@ -0,0 +1 @@
16 +a
17 --- file3
18 +++ file3.orig
19 @@ -0,0 +1 @@
20 +b
21 EOF
22
23 ${GREPDIFF} -nv 'b' diff 2>errors >index || exit 1
24 [ -s errors ] && exit 1
25
26 cat << EOF | cmp - index || exit 1
27 9 file3
28 11 Hunk #1
29 EOF