Debian Codegraph @

tests/lsdiff10/run-test

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