Debian Codegraph @

tests/context1/run-test

raw
1 #!/bin/sh
2
3 # This is a filterdiff(1) testcase.
4 # Test: Context format, to-omission check.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 cat << EOF > patch1
10 *** file.orig
11 --- file
12 ***************
13 *** 2,8 ****
14 b
15 c
16 }
17 - return 0;
18 d
19 e
20 f
21 --- 2,7 ----
22 EOF
23
24 ${FILTERDIFF} <patch1 >patch1-filtered 2>errors || exit 1
25 [ -s errors ] && exit 1
26 cmp patch1 patch1-filtered || exit 1
27
28 cat << EOF > patch2
29 *** file.orig
30 --- file
31 ***************
32 *** 1,8 ****
33 a
34 b
35 c
36 }
37 - return 0;
38 d
39 e
40 f
41 --- 1,8 ----
42 a
43 b
44 c
45 + return -ENOSYS;
46 }
47 d
48 e
49 f
50 EOF
51
52 ${FILTERDIFF} <patch2 >patch2-filtered 2>errors || exit 1
53 [ -s errors ] && exit 1
54 cmp patch2 patch2-filtered || exit 1