[libpng17] Make tests/pngstest* work with the original Bourne shell

This commit is contained in:
John Bowler
2013-02-07 21:52:29 -06:00
committed by Glenn Randers-Pehrson
parent b10867cdc2
commit e88e221d91
33 changed files with 101 additions and 392 deletions

View File

@@ -1,23 +1,2 @@
#!/bin/sh
#
# The name of the script should be:
#
# pngstest-....
#
# Where the last four characters are the suffix of a PNGSuite test file, or
# -error, in which case the x files are used.
case "$0" in
*/pngstest-????)
suffix="${0##*/pngstest\-}"
exec ./pngstest --tmpfile "error" "${srcdir}/contrib/pngsuite/"[^x]*"${suffix}.png";;
*/pngstest-error)
# Test files may not exist, fake a failure if not
set "${srcdir}/contrib/pngsuite/"x*"${suffix}.png"
if test $# -ne 1 -o $1 != "${srcdir}/contrib/pngsuite/x*${suffix}.png"
then
exec ./pngstest --tmpfile "${suffix}" "${srcdir}/contrib/pngsuite/"x*"${suffix}.png"
else
exit 1
fi;;
esac
exec "${srcdir}/tests/pngstest" 2c16