Debian Codegraph @

texk/web2c/omegafonts/selectfont.test

raw
1 #! /bin/sh -vx
2 # $Id: selectfont.test 68158 2023-09-03 11:26:45Z takuji $
3 # Copyright 2017 Karl Berry <[email protected]>
4 # Copyright 2011-2015 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 # pre-generated test results in the repository are stored in LF
12 # but the output might be written in CRLF on some platform.
13 # if 'diff --strip-trailing-cr' is available, exploit it.
14 # (useful for tests on win32 binaries run on MSYS shell)
15 DIFF="diff"
16 $DIFF --strip-trailing-cr $0 $0 \
17 && DIFF="diff --strip-trailing-cr" || echo
18
19 tests=tests
20
21 test -d $tests || mkdir -p $tests
22 rc=0
23
24 TEXMFCNF=$srcdir/../../kpathsea
25 OFMFONTS=./$tests
26 export TEXMFCNF OFMFONTS
27
28 $_omfonts -opl2ofm -verbose $srcdir/$tests/sample0-h $tests/sample0-h || rc=1
29
30 $_omfonts -opl2ofm -verbose $srcdir/$tests/sample0-h $tests/sample1-h || rc=2
31
32 $_omfonts -ofm2opl -verbose sample1-h $tests/sample1-h || rc=3
33
34 diff $srcdir/$tests/sample0-h.opl $tests/sample1-h.opl || rc=4
35
36 $_omfonts -ovp2ovf -verbose $srcdir/$tests/sample $tests/sample $tests/sample || rc=5
37
38 $_omfonts -ovf2ovp -verbose $tests/sample sample $tests/xsample.out || rc=6
39
40 diff $srcdir/$tests/sample.out $tests/xsample.out || rc=7
41
42 $_omfonts -ovp2ovf -verbose $srcdir/$tests/sample.ovp $tests/sample2.ovf || rc=8
43
44 $_omfonts -ovf2ovp -verbose $tests/sample2 sample2 >$tests/xsample2.out || rc=9
45
46 $DIFF $srcdir/$tests/sample.out $tests/xsample2.out || rc=10
47
48 exit $rc