blob: 3d4252f0d30b740006ff5de657699637f21ca65a [file] [log] [blame]
Tom Sepezf4bef482015-07-30 16:49:57 -07001#!/bin/bash
2#
Tom Sepezb2a4d4c2015-12-11 11:09:24 -08003# Copyright 2015 PDFium Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6#
Tom Sepezf4bef482015-07-30 16:49:57 -07007# Script to generate expected result files.
8#
9set -e
10while (( "$#" )); do
11 INFILE="$1"
12 echo $INFILE | grep -qs ' ' && echo space in filename detected && exit 1
13 out/Debug/pdfium_test --png $INFILE
14 RESULTS="$INFILE.*.png"
15 for RESULT in $RESULTS ; do
16 EXPECTED=`echo -n $RESULT | sed 's/[.]pdf[.]/_expected.pdf./'`
17 mv $RESULT $EXPECTED
18 done
19 shift
20done