2012-08-17 16:30:29 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Run the unknown API tests
|
|
|
|
err=0
|
|
|
|
image="${srcdir}/pngtest.png"
|
|
|
|
#
|
|
|
|
# stream 4 is used for the output of the shell, pngtest-log.txt gets all the
|
|
|
|
# normal program output.
|
|
|
|
exec 4>&1 1>>pngtest-log.txt 2>&1
|
|
|
|
|
|
|
|
echo
|
2012-08-17 22:23:06 -04:00
|
|
|
echo "============ test-pngunknown.sh =============="
|
2012-08-17 16:30:29 -04:00
|
|
|
|
2012-08-17 22:23:06 -04:00
|
|
|
echo "Running test-pngunknown.sh" >&4
|
2012-08-17 16:30:29 -04:00
|
|
|
|
|
|
|
for tests in \
|
|
|
|
"discard default=discard"\
|
|
|
|
"save default=save"\
|
|
|
|
"if-safe default=if-safe"\
|
|
|
|
"vpAg vpAg=if-safe"\
|
|
|
|
"sTER sTER=if-safe"\
|
|
|
|
"IDAT default=discard IDAT=save"\
|
|
|
|
"sAPI bKGD=save cHRM=save gAMA=save all=discard iCCP=save sBIT=save sRGB=save"
|
|
|
|
do
|
|
|
|
set $tests
|
|
|
|
test="$1"
|
|
|
|
shift
|
|
|
|
|
2012-08-17 22:23:06 -04:00
|
|
|
if ./pngunknown "$@" "$image" 4>&-
|
2012-08-17 16:30:29 -04:00
|
|
|
then
|
2012-08-17 22:23:06 -04:00
|
|
|
echo " PASS: test-pngunknown $test" >&4
|
2012-08-17 16:30:29 -04:00
|
|
|
else
|
2012-08-17 22:23:06 -04:00
|
|
|
echo " FAIL: test-pngunknown $test" >&4
|
2012-08-17 16:30:29 -04:00
|
|
|
err=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $err
|