tests/nul3/run-test
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | # This is an interdiff(1) testcase. |
| 4 | # Test: Handle embedded nul characters (context format). |
| 5 | |
| 6 | |
| 7 | . ${top_srcdir-.}/tests/common.sh |
| 8 | |
| 9 | echo -e "abc\0" > file1 |
| 10 | echo abc > file2 |
| 11 | |
| 12 | ${DIFF} -ac file1 file2 > cdiff |
| 13 | ${INTERDIFF} -q /dev/null cdiff 2>errors >newdiff || exit 1 |
| 14 | [ -s errors ] && exit 1 |
| 15 | |
| 16 | ${FILTERDIFF} --format=unified cdiff 2>errors > diff || exit 1 |
| 17 | [ -s errors ] && exit 1 |
| 18 | |
| 19 | cmp diff newdiff || exit 1 |