From 911072bc0312a1a0f7eeac01fdf861c02a34a313 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 19 Aug 2016 21:11:38 +0100 Subject: add previously failing icon with transparancy as test --- test/icons/liberation.fr.favicon.ico | Bin 0 -> 18094 bytes test/icons/liberation.fr.favicon.ppm | Bin 0 -> 9322 bytes test/runtest.sh | 11 +++++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 test/icons/liberation.fr.favicon.ico create mode 100644 test/icons/liberation.fr.favicon.ppm diff --git a/test/icons/liberation.fr.favicon.ico b/test/icons/liberation.fr.favicon.ico new file mode 100644 index 0000000..0b670bb Binary files /dev/null and b/test/icons/liberation.fr.favicon.ico differ diff --git a/test/icons/liberation.fr.favicon.ppm b/test/icons/liberation.fr.favicon.ppm new file mode 100644 index 0000000..ddd5aa5 Binary files /dev/null and b/test/icons/liberation.fr.favicon.ppm differ diff --git a/test/runtest.sh b/test/runtest.sh index 28196c5..8e2b33c 100755 --- a/test/runtest.sh +++ b/test/runtest.sh @@ -40,8 +40,15 @@ bmpdecode() icodecode() { OUTF=$(basename ${1} .ico) + CMPF=$(dirname ${1})/${OUTF}.ppm echo "Icon:${1}" >> ${TEST_LOG} ${TEST_PATH}/test_decode_ico ${1} > ${TEST_OUT}/${OUTF}.ppm 2>> ${TEST_LOG} + if [ -f "${CMPF}" ]; then + cmp ${CMPF} ${TEST_OUT}/${OUTF}.ppm >> ${TEST_LOG} 2>> ${TEST_LOG} + if [ "$?" -ne 0 ]; then + return 128 + fi + fi } # bitmap tests @@ -54,7 +61,7 @@ for BMP in $(ls ${BMPTESTS});do BMPTESTTOTC=$((BMPTESTTOTC+1)) bmpdecode ${BMP} ECODE=$? - if [ "${ECODE}" -gt 128 ];then + if [ "${ECODE}" -gt 127 ];then BMPTESTERRC=$((BMPTESTERRC+1)) else BMPTESTPASSC=$((BMPTESTPASSC+1)) @@ -76,7 +83,7 @@ for ICO in $(ls ${ICOTESTS});do ICOTESTTOTC=$((ICOTESTTOTC+1)) icodecode ${ICO} ECODE=$? - if [ "${ECODE}" -gt 128 ];then + if [ "${ECODE}" -gt 127 ];then ICOTESTERRC=$((ICOTESTERRC+1)) else ICOTESTPASSC=$((ICOTESTPASSC+1)) -- cgit v1.2.3