| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: ligkern.test 68079 2023-08-26 22:16:10Z karl $ |
| 3 |
# Copyright 2017-2023 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 |
_omfonts=$BinDir/omfonts$ExeExt |
| 10 |
|
| 11 |
tests=tests |
| 12 |
|
| 13 |
test -d $tests || mkdir -p $tests |
| 14 |
|
| 15 |
TEXMFCNF=$srcdir/../../kpathsea |
| 16 |
OFMFONTS=".;./$tests" |
| 17 |
export TEXMFCNF OFMFONTS |
| 18 |
|
| 19 |
ligfiles='ligall ligbch ligblb ligbdy' |
| 20 |
|
| 21 |
rc=0 |
| 22 |
|
| 23 |
for f in $ligfiles; do |
| 24 |
echo && echo "*** opl2ofm $f x$f" |
| 25 |
$_omfonts -opl2ofm $srcdir/$tests/$f $tests/x$f || rc=1 |
| 26 |
|
| 27 |
echo && echo "*** ofm2opl x$f x$f" |
| 28 |
$_omfonts -ofm2opl $tests/x$f $tests/x$f || rc=2 |
| 29 |
|
| 30 |
echo && echo "*** diff $f.opl x$f.opl" |
| 31 |
diff $srcdir/$tests/$f.opl $tests/x$f.opl || rc=3 |
| 32 |
done |
| 33 |
|
| 34 |
echo && echo "*** ovp2ovf ligblv xligblv xligblv" |
| 35 |
$_omfonts -ovp2ovf $srcdir/$tests/ligblv $tests/xligblv $tests/xligblv || { rc=4; echo '*** failed ***'; } |
| 36 |
|
| 37 |
echo && echo "*** ofm2opl xligblv xligblv" |
| 38 |
$_omfonts -ofm2opl $tests/xligblv $tests/xligblv || { rc=5; echo '*** failed ***'; } |
| 39 |
|
| 40 |
echo && echo "*** diff ligblv.opl xligblv.opl" |
| 41 |
diff $srcdir/$tests/ligblv.opl $tests/xligblv.opl >/dev/null || { rc=6; echo '*** failed ***'; } |
| 42 |
|
| 43 |
echo && echo "*** ofm2opl ligloop1 xligloop1" |
| 44 |
$_omfonts -ofm2opl $srcdir/$tests/ligloop1 $tests/xligloop1 || rc=7 |
| 45 |
|
| 46 |
echo && echo "*** diff ligloop1.opl xligloop1.opl" |
| 47 |
diff $srcdir/$tests/ligloop1.opl $tests/xligloop1.opl || rc=8 |
| 48 |
|
| 49 |
echo && echo "*** opl2ofm xligloop1 xligloop1" |
| 50 |
$_omfonts -opl2ofm $tests/xligloop1 $tests/xligloop1 || rc=9 |
| 51 |
|
| 52 |
echo && echo "*** ofm2opl xligloop1 xligloop2" |
| 53 |
$_omfonts -ofm2opl $tests/xligloop1 $tests/xligloop2 || rc=10 |
| 54 |
|
| 55 |
echo && echo "*** diff ligloop2.opl xligloop2.opl" |
| 56 |
diff $srcdir/$tests/ligloop2.opl $tests/xligloop2.opl || rc=11 |
| 57 |
|
| 58 |
echo && echo "*** opl2ofm liguse xliguse1" |
| 59 |
$_omfonts -opl2ofm $srcdir/$tests/liguse $tests/xliguse1 || rc=12 |
| 60 |
|
| 61 |
echo && echo "*** ofm2opl xliguse1 xliguse1" |
| 62 |
$_omfonts -ofm2opl $tests/xliguse1 $tests/xliguse1 || rc=13 |
| 63 |
|
| 64 |
echo && echo "*** diff liguse1.opl xliguse1.opl" |
| 65 |
diff $srcdir/$tests/liguse1.opl $tests/xliguse1.opl || rc=14 |
| 66 |
|
| 67 |
echo && echo "*** opl2ofm xliguse1 xliguse2" |
| 68 |
$_omfonts -opl2ofm $tests/xliguse1 $tests/xliguse2 || rc=15 |
| 69 |
|
| 70 |
echo && echo "*** ofm2opl xliguse2 xliguse2" |
| 71 |
$_omfonts -ofm2opl $tests/xliguse2 $tests/xliguse2 || rc=16 |
| 72 |
|
| 73 |
echo && echo "*** diff liguse2.opl xliguse2.opl" |
| 74 |
diff $srcdir/$tests/liguse2.opl $tests/xliguse2.opl || rc=17 |
| 75 |
|
| 76 |
exit $rc |