Debian Codegraph @

tests/U0/run-test

raw
1 #!/bin/sh
2 #
3 # This is an interdiff(1) test case.
4 # Test: -U0 works correctly.
5
6
7 . ${top_srcdir-.}/tests/common.sh
8
9 >file.orig
10 cat << EOF > file
11 add some stuff
12 to the file
13 which was empty
14 EOF
15 ${DIFF} -u file.orig file > patch1
16 cp file after-patch1
17
18 cat << EOF > file
19 add some lines
20 to the beginning
21 of the file
22 add some stuff
23 to the file
24 which was empty
25 EOF
26 ${DIFF} -u file.orig file > patch2
27
28 ${INTERDIFF} -U0 patch1 patch2 2>errors > patch1-2 || exit 1
29 [ -s errors ] && exit 1
30 ${PATCH} after-patch1 < patch1-2 || exit 1