| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: updvitype.test 75026 2025-04-26 08:08:19Z takuji $ |
| 3 |
# Copyright 2022 Japanese TeX Development Community <[email protected]> |
| 4 |
# Copyright 2017 Karl Berry <[email protected]> |
| 5 |
# Copyright 2011-2013 Peter Breitenlohner <[email protected]> |
| 6 |
# You may freely use, modify and/or distribute this file. |
| 7 |
|
| 8 |
BinDir=${BinDir:-.} |
| 9 |
ExeExt=${ExeExt:-} |
| 10 |
_updvitype=$BinDir/updvitype$ExeExt |
| 11 |
|
| 12 |
test -d uptests || mkdir -p uptests |
| 13 |
|
| 14 |
rc=0 |
| 15 |
|
| 16 |
if tfmpath=`$KPSEWHICH cmbx10.tfm`; then |
| 17 |
|
| 18 |
TEXMFCNF=$srcdir/../kpathsea \ |
| 19 |
TFMFONTS=`dirname "$tfmpath"` \ |
| 20 |
$_updvitype -show-opcodes $srcdir/tests/story >uptests/xstory.dvityp || rc=1 |
| 21 |
|
| 22 |
fi |
| 23 |
|
| 24 |
TEXMFCNF=$srcdir/../kpathsea \ |
| 25 |
TFMFONTS=$srcdir/tests \ |
| 26 |
$_updvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >uptests/xpagenum.typ || rc=2 |
| 27 |
|
| 28 |
|
| 29 |
TEXMFCNF=$srcdir/../kpathsea |
| 30 |
TFMFONTS=$srcdir/uptexdir/tests:$srcdir/tests |
| 31 |
export TEXMFCNF TFMFONTS |
| 32 |
|
| 33 |
for enc in utf8 jis; do |
| 34 |
for doc in ptex3 ptex4; do |
| 35 |
$_updvitype -kanji=$enc $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc-$enc.typ || rc=3 |
| 36 |
sed 1d uptests/x$doc-$enc.typ >uptests/x${doc}a-$enc.typ |
| 37 |
diff $srcdir/uptexdir/tests/${doc}a-$enc.typ uptests/x${doc}a-$enc.typ || rc=4 |
| 38 |
done |
| 39 |
done |
| 40 |
|
| 41 |
for doc in uptex3 uptex4 uptex5; do |
| 42 |
$_updvitype $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc.typ || rc=5 |
| 43 |
sed 1d uptests/x$doc.typ >uptests/x${doc}a.typ |
| 44 |
diff $srcdir/uptexdir/tests/${doc}a.typ uptests/x${doc}a.typ || rc=6 |
| 45 |
done |
| 46 |
|
| 47 |
exit $rc |