| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# GitHub issue #157: Binary files should be numbered sequentially |
| 4 |
|
| 5 |
. ${top_srcdir-.}/tests/common.sh |
| 6 |
|
| 7 |
cat << 'EOF' > diff |
| 8 |
diff --git a/file1.bin b/file1.bin |
| 9 |
new file mode 100644 |
| 10 |
Binary files /dev/null and b/file1.bin differ |
| 11 |
diff --git a/file2.bin b/file2.bin |
| 12 |
new file mode 100644 |
| 13 |
Binary files /dev/null and b/file2.bin differ |
| 14 |
EOF |
| 15 |
|
| 16 |
# Note: using --git-extended-diffs=include to test binary file numbering |
| 17 |
${LSDIFF} --git-extended-diffs=include -N diff 2>errors >output || exit 1 |
| 18 |
[ -s errors ] && exit 1 |
| 19 |
|
| 20 |
cat << 'EOF' | cmp - output || exit 1 |
| 21 |
File #1 a/file1.bin |
| 22 |
File #2 a/file2.bin |
| 23 |
EOF |