diff options
Diffstat (limited to 'testing')
-rwxr-xr-x | testing/tools/make_expected.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/tools/make_expected.sh b/testing/tools/make_expected.sh new file mode 100755 index 0000000000..c6e50dc652 --- /dev/null +++ b/testing/tools/make_expected.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Script to generate expected result files. +# +set -e +while (( "$#" )); do + INFILE="$1" + echo $INFILE | grep -qs ' ' && echo space in filename detected && exit 1 + out/Debug/pdfium_test --png $INFILE + RESULTS="$INFILE.*.png" + for RESULT in $RESULTS ; do + EXPECTED=`echo -n $RESULT | sed 's/[.]pdf[.]/_expected.pdf./'` + mv $RESULT $EXPECTED + done + shift +done |