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