summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-30 16:49:57 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-30 16:49:57 -0700
commitf4bef481c86e6ee21d25a350061caff82d57df7b (patch)
tree3f34066205c28ee725f2f7d33894b9b702f70cb7
parent91b70b112e9076b3a866572fe8d2d17cfe5faa9e (diff)
downloadpdfium-f4bef481c86e6ee21d25a350061caff82d57df7b.tar.xz
Merge to XFA: Add simple script to regenerate expected results.
(cherry picked from commit 3fc30f0778ff0bfb1c61e7994e6472a34bdc98bd) Review URL: https://codereview.chromium.org/1264873005 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1266503004 .
-rwxr-xr-xtesting/tools/make_expected.sh16
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