Debian Codegraph @

texk/web2c/omegaware/check.test

raw
1 #! /bin/sh -vx
2 # $Id: check.test 67907 2023-08-13 13:50:50Z takuji $
3 # Copyright 2017 Karl Berry <[email protected]>
4 # Copyright 2014, 2015 Peter Breitenlohner <[email protected]>
5 # You may freely use, modify and/or distribute this file.
6
7 BinDir=${BinDir:-.}
8 ExeExt=${ExeExt:-}
9 _wofm2opl=$BinDir/wofm2opl$ExeExt
10 _wopl2ofm=$BinDir/wopl2ofm$ExeExt
11
12 # pre-generated test results in the repository are stored in LF
13 # but the output might be written in CRLF on some platform.
14 # if 'diff --strip-trailing-cr' is available, exploit it.
15 # (useful for tests on win32 binaries run on MSYS shell)
16 DIFF="diff"
17 $DIFF --strip-trailing-cr $0 $0 \
18 && DIFF="diff --strip-trailing-cr" || echo
19
20 tests=omegaware/tests
21
22 test -d $tests || mkdir -p $tests
23 rc=0
24
25 TEXMFCNF=$srcdir/../kpathsea
26 OFMFONTS=".;./$tests"
27 export TEXMFCNF OFMFONTS
28
29 echo && echo "*** ofm2opl check xcheck"
30 $_wofm2opl $srcdir/$tests/check $tests/xcheck || rc=1
31
32 echo && echo "*** diff check.opl xcheck.opl"
33 diff $srcdir/$tests/check.opl $tests/xcheck.opl || rc=2
34
35 echo && echo "*** opl2ofm xcheck xchecked"
36 $_wopl2ofm $tests/xcheck $tests/xchecked || rc=3
37
38 echo && echo "*** ofm2opl xchecked stdout (xchecked.opl)"
39 $_wofm2opl $tests/xchecked >$tests/xchecked.opl || rc=4
40
41 echo && echo "*** diff checked.opl xchecked.opl"
42 $DIFF $srcdir/$tests/checked.opl $tests/xchecked.opl || rc=5
43
44 exit $rc