ref: 2c6b360db42b1efc53494049b67fddf33dbc7dfd
parent: 1229240608d8efcb31315e1d46382335cd410d8c
author: Sebastian Rasmussen <sebras@gmail.com>
date: Tue Mar 20 22:38:15 EDT 2018
Fix 698839: Add hash for testcases that fail to decode anything. The testrunner stated that the expected hash for 042_13.jb2 and 042_14.jb2 was that of a successfully decoded image. Historically these two images have caused jbig2dec to segfault, but nowadays they correctly cause FATAL ERRORs. When FATAL ERRORs are encountered as hash covering 0 bytes of image data is computed, so the testrunner now expects this hash instead. Therefore the check now run successfully.
--- a/test_jbig2dec.py
+++ b/test_jbig2dec.py
@@ -59,6 +59,7 @@
'self test to check for correct decode of known test files'
# hashes of known test inputs
+ known_NOTHING_DECODED = "da39a3ee5e6b4b0d3255bfef95601890afd80709"
known_042_DECODED = "ebfdf6e2fc5ff3ee2271c2fa19de0e52712046e8"
known_amb_DECODED = "3d4b7992d506894662b53415bd3d0d2a2f8b7953"
@@ -102,10 +103,10 @@
known_042_DECODED),
('../ubc/042_13.jb2',
"7d428bd542f58591b254d9827f554b0552c950a7",
- known_042_DECODED),
+ known_NOTHING_DECODED),
('../ubc/042_14.jb2',
"c40fe3a02acb6359baf9b40fc9c49bc0800be589",
- known_042_DECODED),
+ known_NOTHING_DECODED),
('../ubc/042_15.jb2',
"a9e39fc1ecb178aec9f05039514d75ea3246246c",
known_042_DECODED),