File size: 736 Bytes
4a85060 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/sh
# Swaps the byte order of test EXIF files and ensures the data don't change.
srcdir="${srcdir:-.}"
TMPLOG="$(mktemp)"
trap 'rm -f "${TMPLOG}"' 0
. ${srcdir}/inc-comparetool.sh
# Ensure that names are untranslated
LANG=
LANGUAGE=
LC_ALL=C
export LANG LANGUAGE LC_ALL
for fn in "${srcdir}"/testdata/*.jpg ; do
# The *.parsed text files have LF line endings, so the tr removes
# the CR from CRLF line endings, while keeping LF line endings the
# same.
./test-parse$EXEEXT --swap-byte-order "${fn}" | tr -d '\015' | sed -e '/^New byte order:/d' > "${TMPLOG}"
if ${comparetool} "${fn}.parsed" "${TMPLOG}"; then
: "no differences detected"
else
echo Error parsing "$fn"
exit 1
fi
done
|