Debian Codegraph @

tests/lsdiff8/run-test

raw
1 #!/bin/sh
2
3 # This is a lsdiff(1) testcase.
4 # Test: -nv output format, unified input
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > diff
10 --- file1
11 +++ file1
12 @@ -0,0 +1 @@
13 +a
14 @@ -60 +60 @@
15 -a
16 +b
17 --- orig/file2
18 +++ file2
19 @@ -0,0 +1 @@
20 +a
21 --- file3
22 +++ file3.orig
23 @@ -0,0 +1 @@
24 +a
25 EOF
26
27 ${LSDIFF} -nv diff 2>errors >index || exit 1
28 [ -s errors ] && exit 1
29
30 cat << EOF | cmp - index || exit 1
31 1 file1
32 3 Hunk #1
33 5 Hunk #2
34 8 file2
35 10 Hunk #1
36 12 file3
37 14 Hunk #1
38 EOF