| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
. ${top_srcdir-.}/tests/common.sh |
| 4 |
|
| 5 |
mkdir -p v2.4.0-test5/linux |
| 6 |
mkdir linux |
| 7 |
cat << EOF > v2.4.0-test5/linux/file |
| 8 |
a |
| 9 |
b |
| 10 |
c |
| 11 |
EOF |
| 12 |
cat << EOF > new1 |
| 13 |
a |
| 14 |
b |
| 15 |
EOF |
| 16 |
cat << EOF > new2 |
| 17 |
b |
| 18 |
c |
| 19 |
EOF |
| 20 |
|
| 21 |
cp new1 linux/file |
| 22 |
${DIFF} -u v2.4.0-test5/linux/file linux/file > patch1 |
| 23 |
cp new2 linux/file |
| 24 |
${DIFF} -u v2.4.0-test5/linux/file linux/file > patch2 |
| 25 |
${INTERDIFF} patch1 patch2 2>errors > patch1-2 || exit 1 |
| 26 |
[ -s errors ] && exit 1 |
| 27 |
mkdir test |
| 28 |
cp new1 test/file |
| 29 |
cd test |
| 30 |
${PATCH} < ../patch1-2 || exit 1 |
| 31 |
cd .. |
| 32 |
cmp new2 test/file || exit 1 |
| 33 |
cd test |
| 34 |
${PATCH} -R < ../patch1-2 |
| 35 |
cd .. |
| 36 |
cmp new1 test/file || exit 1 |