[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

13
tests/pngstest Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
#
# Usage:
#
# tests/pngstest pattern
#
# Runs pngstest on all the contrib/pngsuite/[^x]*${pattern}.png files
# NOTE: pattern is used to name the temporary files pngstest generates
#
pattern="$1"
shift
exec ./pngstest --strict --tmpfile "${pattern}" --log ${1+"$@"}\
"${srcdir}/contrib/pngsuite/"[a-wyz]*${pattern}".png"

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" 0g01

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##*}"
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" 0g02

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" 0g04

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" 0g08

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" 0g16

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" 2c08

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

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" 3p01

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" 3p02

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" 3p04

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" 3p08

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" 4a08

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" 4a16

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" 6a08

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" 6a16

View File

@@ -1,23 +1,14 @@
#!/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"
code=77 # skipped
for t in "${srcdir}/contrib/pngsuite/"x*".png"
do
if test "$t" != "${srcdir}/contrib/pngsuite/x*.png"
then
# not skipped, test it
if ./pngstest --strict --tmpfile "error" --log "$@" "$t"
then
exec ./pngstest --tmpfile "${suffix}" "${srcdir}/contrib/pngsuite/"x*"${suffix}.png"
else
exit 1
fi;;
esac
code=0 # oops, success: should not happen!
fi
fi
done
exit $code