| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: pplib.test 45809 2017-11-15 00:36:56Z karl $ |
| 3 |
# Copyright 2017 Karl Berry <[email protected]> |
| 4 |
# Copyright 2010 Peter Breitenlohner <[email protected]> |
| 5 |
# You may freely use, modify and/or distribute this file. |
| 6 |
|
| 7 |
# pre-generated test results in the repository are stored in LF |
| 8 |
# but the output might be written in CRLF on some platform. |
| 9 |
# if 'diff --strip-trailing-cr' is available, exploit it. |
| 10 |
# (useful for tests on win32 binaries run on MSYS shell) |
| 11 |
DIFF="diff" |
| 12 |
$DIFF --strip-trailing-cr $0 $0 \ |
| 13 |
&& DIFF="diff --strip-trailing-cr" || echo |
| 14 |
|
| 15 |
#srcdir='../../../source/libs/pplib' |
| 16 |
#PPLIB_TREE=pplib-src |
| 17 |
|
| 18 |
rm -rf test |
| 19 |
mkdir test |
| 20 |
|
| 21 |
cp $srcdir/$PPLIB_TREE/test/luaimage.pdf test |
| 22 |
|
| 23 |
(cd test && ../pptest1 luaimage.pdf | sed -e 's/memused.*$//;s/memwaste.*$//;' >out1 || exit 1) \ |
| 24 |
&& (cd test && ../pptest2 luaimage.pdf >out2 || exit 2) \ |
| 25 |
&& (cd test && ../pptest3 luaimage.pdf >out3 || exit 3) || exit 4 |
| 26 |
|
| 27 |
|
| 28 |
diff $srcdir/$PPLIB_TREE/test/out1 test/out1 || exit 5 |
| 29 |
$DIFF $srcdir/$PPLIB_TREE/test/out2 test/out2 || exit 6 |
| 30 |
diff $srcdir/$PPLIB_TREE/test/luaimage.pdf.out test/luaimage.pdf.out || exit 7 |
| 31 |
$DIFF $srcdir/$PPLIB_TREE/test/out3 test/out3 || exit 8 |
| 32 |
|