summaryrefslogtreecommitdiff
path: root/Build/tests/largefile/hugepdf.test
blob: 6b632e622301a13d05af94ba4c0ee49b19ef73fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
#
# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

usage () {
  echo "usage: $0 PDFTEX-ENGINE" >&2
  echo "	test that pdfTeX can create PDF files with >2GB" >&2
  echo "" >&2
  echo "	where PDFTEX-ENGINE is the path to pdfTeX (or perhaps luaTeX)" >&2
  exit 1
}

test -n "$1" && test -x "$1" || usage

dir=`dirname "$0"`
TEXMFCNF=`cd "$dir" && pwd`
export TEXMFCNF

PDFTEX=`dirname "$1"`/`basename "$1"`

echo testing "'$PDFTEX'"
echo
"$PDFTEX" -ini hugepdf && mv -f hugepdf.{,ini}log && "$PDFTEX" -fmt=hugepdf hugepdf
echo

if grep '^Output written.*(5000 pages,' hugepdf.log >/dev/null; then
  ls -lh hugepdf.pdf
  echo PASS: hugepdf.test
  rm -f hugepdf.fmt # hugepdf.log hugepdf.pdf
else
  echo FAIL: hugepdf.test
fi