| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: upmpsamp.test 69684 2024-02-03 02:15:55Z takuji $ |
| 3 |
# Copyright 2017-2018 Karl Berry <[email protected]> |
| 4 |
# Copyright 2014 Peter Breitenlohner <[email protected]> |
| 5 |
# You may freely use, modify and/or distribute this file. |
| 6 |
|
| 7 |
BinDir=${BinDir:-.} |
| 8 |
ExeExt=${ExeExt:-} |
| 9 |
_upmpost=$BinDir/upmpost$ExeExt |
| 10 |
_euptex=$BinDir/euptex$ExeExt |
| 11 |
|
| 12 |
LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE |
| 13 |
|
| 14 |
tests=pmpostdir/tests |
| 15 |
|
| 16 |
test -d $tests || mkdir -p $tests |
| 17 |
|
| 18 |
TEXMFCNF=${TEXMFCNF:-$srcdir/../kpathsea} |
| 19 |
export TEXMFCNF |
| 20 |
|
| 21 |
tfmpath=`$KPSEWHICH cmr10.tfm` || exit 77 |
| 22 |
TFMFONTS="$srcdir/$tests;`echo $tfmpath | sed 's,/fonts/tfm/.*$,/fonts/tfm//,'`" |
| 23 |
|
| 24 |
mppath=`$KPSEWHICH plain.mp` || exit 77 |
| 25 |
MPINPUTS=".;`dirname $mppath`" |
| 26 |
|
| 27 |
mappath=`$KPSEWHICH psfonts.map` || exit 77 |
| 28 |
TEXFONTMAPS=`echo $mappath | sed 's,/fonts/map/.*$,/fonts/map//,'` |
| 29 |
|
| 30 |
t1path=`$KPSEWHICH cmmi10.pfb` || exit 77 |
| 31 |
T1FONTS="$srcdir/$tests;`echo $t1path | sed 's,/fonts/type1/.*$,/fonts/type1//,'`" |
| 32 |
|
| 33 |
vfpath=`$KPSEWHICH upjisr-h.vf` || exit 77 |
| 34 |
VFFONTS="$srcdir/$tests;`dirname $vfpath`" |
| 35 |
|
| 36 |
export TFMFONTS MPINPUTS TEXFONTMAPS T1FONTS VFFONTS |
| 37 |
|
| 38 |
# check that we have euptex at all. |
| 39 |
$_euptex -version >/dev/null 2>&1 || exit 77 |
| 40 |
|
| 41 |
# ensure that euptex.fmt exists and can be read. |
| 42 |
$_euptex \\end >/dev/null 2>&1 || exit 77 |
| 43 |
|
| 44 |
echo 'input plain;' >upmpsamp.mp |
| 45 |
cat "$srcdir/$tests/psample.mp" >>upmpsamp.mp |
| 46 |
|
| 47 |
$_upmpost -ini -tex=$_euptex upmpsamp || exit 1 |
| 48 |
|