diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-30 16:48:28 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-30 16:48:28 -0700 |
commit | 3fc30f0778ff0bfb1c61e7994e6472a34bdc98bd (patch) | |
tree | 2dc35558a766a24f9214e125e2fe9f867f5d9eaf /testing | |
parent | 6fc1bf199833d6cb409e8134fe5d6894e8323673 (diff) | |
download | pdfium-3fc30f0778ff0bfb1c61e7994e6472a34bdc98bd.tar.xz |
Add simple script to regenerate expected results.
(I've been doing this by hand for far too long).
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1264873005 .
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 |