summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegaware/selectfont.test
blob: c5606cb55565c5d0caaf9adbd9c57f05ac6ee97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2011-2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_wofm2opl=$BinDir/wofm2opl$ExeExt
_wopl2ofm=$BinDir/wopl2ofm$ExeExt
_wovf2ovp=$BinDir/wovf2ovp$ExeExt
_wovp2ovf=$BinDir/wovp2ovf$ExeExt

# pre-generated test results in the repository are stored in LF
# but the output might be written in CRLF on some platform.
# if 'diff --strip-trailing-cr' is available, exploit it.
# (useful for tests on win32 binaries run on MSYS shell)
DIFF="diff"
$DIFF --strip-trailing-cr $0 $0 \
  && DIFF="diff --strip-trailing-cr" || echo

tests=omegaware/tests

test -d $tests || mkdir -p $tests
rc=0

TEXMFCNF=$srcdir/../kpathsea
OFMFONTS=./$tests
export TEXMFCNF OFMFONTS

$_wopl2ofm -verbose $srcdir/$tests/sample0-h $tests/sample0-h || rc=1

$_wopl2ofm -verbose $srcdir/$tests/sample0-h $tests/sample1-h || rc=2

$_wofm2opl -verbose sample1-h $tests/sample1-h || rc=3

diff $srcdir/$tests/sample0-h.opl $tests/sample1-h.opl || rc=4

$_wovp2ovf -verbose $srcdir/$tests/sample $tests/sample $tests/sample || rc=5

$_wovf2ovp -verbose $tests/sample sample $tests/xsample.out  || rc=6

diff $srcdir/$tests/sample.out $tests/xsample.out || rc=7

$_wovp2ovf -verbose $srcdir/$tests/sample.ovp $tests/sample2.ovf || rc=8

$_wovf2ovp -verbose $tests/sample2 sample2 >$tests/xsample2.out || rc=9

$DIFF $srcdir/$tests/sample.out $tests/xsample2.out || rc=10

exit $rc