Debian Codegraph @

tests/lsdiff15/run-test

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