mirror of
https://github.com/openharmony/third_party_libexif.git
synced 2026-07-01 12:47:16 -04:00
871724f4ab
Signed-off-by: zhanglitao <zhanglitao11@huawei.com>
30 lines
798 B
Bash
30 lines
798 B
Bash
#!/bin/sh
|
|
# Parses test EXIF files and compares the results to that expected
|
|
#
|
|
# Copyright (C) 2018-2021 Dan Fandrich <dan@coneharvesters.com>, et. al.
|
|
# SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
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 "${fn}" | tr -d '\015' > "${TMPLOG}"
|
|
if ${comparetool} "${fn}.parsed" "${TMPLOG}"; then
|
|
: "no differences detected"
|
|
else
|
|
echo "Error parsing $fn"
|
|
exit 1
|
|
fi
|
|
done
|