Debian Codegraph @

tests/patchview1/run-test

raw
1 #!/bin/sh
2
3 # This is a patchview(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 +a
21 EOF
22
23 ${PATCHVIEW} diff 2>errors >index || exit 1
24 [ -s errors ] && exit 1
25
26 cat << EOF | cmp - index || exit 1
27 File #1 file1
28 File #2 file2
29 File #3 file3
30 EOF