mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Make tests/pngstest* work with the original Bourne shell
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
b10867cdc2
commit
e88e221d91
13
tests/pngstest
Executable file
13
tests/pngstest
Executable 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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user