summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-08-19 20:11:38 (GMT)
committer Vincent Sanders <vince@kyllikki.org>2016-08-19 20:11:38 (GMT)
commit911072bc0312a1a0f7eeac01fdf861c02a34a313 (patch)
treedee42b7ed9d0ef2aadd863005854604e8f4c914e
parent1eff62bd9d4a97bab3973aaf55f64aabc9ec9876 (diff)
downloadlibnsbmp-911072bc0312a1a0f7eeac01fdf861c02a34a313.tar.gz
libnsbmp-911072bc0312a1a0f7eeac01fdf861c02a34a313.tar.bz2
add previously failing icon with transparancy as test
-rw-r--r--test/icons/liberation.fr.favicon.icobin0 -> 18094 bytes
-rw-r--r--test/icons/liberation.fr.favicon.ppmbin0 -> 9322 bytes
-rwxr-xr-xtest/runtest.sh11
3 files changed, 9 insertions, 2 deletions
diff --git a/test/icons/liberation.fr.favicon.ico b/test/icons/liberation.fr.favicon.ico
new file mode 100644
index 0000000..0b670bb
--- a/dev/null
+++ b/test/icons/liberation.fr.favicon.ico
Binary files differ
diff --git a/test/icons/liberation.fr.favicon.ppm b/test/icons/liberation.fr.favicon.ppm
new file mode 100644
index 0000000..ddd5aa5
--- a/dev/null
+++ b/test/icons/liberation.fr.favicon.ppm
Binary files 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))