Debian Codegraph @

tests/lsdiff7/run-test

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