• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# Swaps the byte order of test EXIF files and ensures the data don't change.
3srcdir="${srcdir:-.}"
4TMPLOG="$(mktemp)"
5trap 'rm -f "${TMPLOG}"' 0
6# Ensure that names are untranslated
7LANG=
8LANGUAGE=
9LC_ALL=C
10export LANG LANGUAGE LC_ALL
11for fn in "${srcdir}"/testdata/*.jpg ; do
12    ./test-parse --swap-byte-order "${fn}" | sed -e '/^New byte order:/d' > "${TMPLOG}"
13    if ! diff "${fn}".parsed "${TMPLOG}"; then
14        echo Error parsing "$fn"
15        exit 1
16    fi
17done
18