Debian Codegraph @

tests/lsdiff14/run-test

raw
1 #!/bin/sh
2
3 # This is a lsdiff(1) testcase.
4 # Test: -Es 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 @@ -1 +0,0 @@
24 -a
25 EOF
26
27 ${LSDIFF} -Es diff 2>errors >index || exit 1
28 [ -s errors ] && exit 1
29
30 cat << EOF | cmp - index || exit 1
31 ! file1
32 + file2
33 - file3
34 EOF