| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: pdftosrc.test 804 2018-05-17 22:29:15Z karl $ |
| 3 |
# Copyright 2017 Karl Berry <[email protected]> |
| 4 |
# Copyright 2011 Peter Breitenlohner <[email protected]> |
| 5 |
# You may freely use, modify and/or distribute this file. |
| 6 |
|
| 7 |
BinDir=${BinDir:-.} |
| 8 |
ExeExt=${ExeExt:-} |
| 9 |
_pdftosrc=$BinDir/pdftosrc$ExeExt |
| 10 |
|
| 11 |
# pre-generated test results in the repository are stored in LF |
| 12 |
# but the output might be written in CRLF on some platform. |
| 13 |
# if 'diff --strip-trailing-cr' is available, exploit it. |
| 14 |
# (useful for tests on win32 binaries run on MSYS shell) |
| 15 |
DIFF="diff" |
| 16 |
$DIFF --strip-trailing-cr $0 $0 \ |
| 17 |
&& DIFF="diff --strip-trailing-cr" || echo |
| 18 |
|
| 19 |
src=$srcdir/pdftexdir/tests |
| 20 |
|
| 21 |
rm -rf test-13.* test-15.* |
| 22 |
|
| 23 |
cp $src/test-13.pdf . |
| 24 |
$_pdftosrc test-13.pdf -1 \ |
| 25 |
&& $DIFF test-13.xref $src/test-13.xref \ |
| 26 |
|| exit 1 |
| 27 |
|
| 28 |
cp $src/test-15.pdf . |
| 29 |
$_pdftosrc test-15.pdf -1 \ |
| 30 |
&& $DIFF test-15.xref $src/test-15.xref \ |
| 31 |
|| exit 2 |
| 32 |
|