| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# This is a rediff(1) testcase. |
| 4 |
# Test: Change the content of an added line. No offsets need changing. |
| 5 |
|
| 6 |
|
| 7 |
. ${top_srcdir-.}/tests/common.sh |
| 8 |
|
| 9 |
cat << EOF > file.orig |
| 10 |
a |
| 11 |
EOF |
| 12 |
cat << EOF > file |
| 13 |
b |
| 14 |
EOF |
| 15 |
|
| 16 |
${DIFF} -u file.orig file > original-patch |
| 17 |
sed -e 's/^+b$/+c/' original-patch > edited-patch |
| 18 |
|
| 19 |
${REDIFF} original-patch edited-patch 2>errors >rediffed-patch || exit 1 |
| 20 |
[ -s errors ] && exit 1 |
| 21 |
|
| 22 |
# The rediffed patch should be the same. |
| 23 |
cmp edited-patch rediffed-patch || exit 1 |