tests/newline2/run-test
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | . ${top_srcdir-.}/tests/common.sh |
| 4 | |
| 5 | mkdir dir |
| 6 | mkdir modified |
| 7 | cat << EOF > modified/file |
| 8 | a |
| 9 | b |
| 10 | EOF |
| 11 | echo -n c >> modified/file |
| 12 | |
| 13 | touch patch1 |
| 14 | ${DIFF} -urN dir modified > patch2 |
| 15 | ${INTERDIFF} patch1 patch2 2>errors > patch1-2 || exit 1 |
| 16 | [ -s errors ] && exit 1 |
| 17 | cd dir |
| 18 | ${PATCH} < ../patch1-2 || exit 1 |
| 19 | cd .. |
| 20 | ${DIFF} -urN dir modified || exit 1 |