summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/omegaware/odvicopy.test
blob: 3a08f0ce14ac76b333beb7d7593fd64f8b046b3a (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#! /bin/sh -vx
# $Id$
# Copyright 2017-2018 Karl Berry <tex-live@tug.org>
# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_odvicopy=$BinDir/odvicopy$ExeExt
_odvitype=$BinDir/odvitype$ExeExt

LC_ALL=C; export LC_ALL;  LANGUAGE=C; export LANGUAGE

tests=omegaware/tests

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

echo && echo "*** odvicopy -help"
$_odvicopy -help || rc=1

echo && echo "*** odvicopy -version"
$_odvicopy -version || rc=2

# Test page selection
#
echo && echo "*** odvicopy --p=*.*.2 --max=1 pagenum.dvi xpagenum.dvi >xpagenum.log"
TEXMFCNF=$srcdir/../kpathsea \
  TFMFONTS=$srcdir/tests \
  $_odvicopy --p=\*.\*.2 --max=1 $srcdir/tests/pagenum.dvi $tests/xpagenum.dvi \
    >$tests/xpagenum.log || rc=3

echo && echo "*** grep '1 page written\.$' xpagenum.log"
grep '1 page written\.$' $tests/xpagenum.log || rc=4

# First a straight copy
#
rm -f ofont*vf

echo && echo "*** odvicopy ofontd0 xofontd1 (without VF/OVF files)"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  OVFFONTS=. \
  $_odvicopy $srcdir/$tests/ofontd0 $tests/xofontd1 || rc=5

echo && echo "*** odvitype xofontd1 >xofontd1.typ"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  $_odvitype $tests/xofontd1 | sed '1s/ (.*)$//' >$tests/xofontd1.typ || rc=6

diff $srcdir/$tests/ofontd1.typ $tests/xofontd1.typ || rc=7

# Next with VF/OVF files for ofontv[4-6]
#
cp $srcdir/$tests/ofontv*vf .

echo && echo "*** odvicopy ofontd1 xofontd2 (with VF/OVF files for ofontv[4-6])"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  OVFFONTS=. \
  $_odvicopy $tests/xofontd1 $tests/xofontd2 || rc=8

echo && echo "*** odvitype xofontd2 >xofontd2.typ"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  $_odvitype $tests/xofontd2 | sed '1s/ (.*)$//' >$tests/xofontd2.typ || rc=9

diff $srcdir/$tests/ofontd2.typ $tests/xofontd2.typ || rc=10

# Finally with VF/OVF files for ofontr[1-3] and ofontv[4-6]
#
cp $srcdir/$tests/ofontr*vf .

echo && echo "*** odvicopy ofontd0 xofontd3 (with VF/OVF files for ofontr[1-3] and ofontv[4-6])"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  OVFFONTS=. \
  $_odvicopy $srcdir/$tests/ofontd0 $tests/xofontd3 || rc=11

echo && echo "*** odvitype xofontd3 >xofontd3.typ"
TEXMFCNF=$srcdir/../kpathsea \
  OFMFONTS=$srcdir/$tests \
  $_odvitype $tests/xofontd3 | sed '1s/ (.*)$//' >$tests/xofontd3.typ || rc=12

diff $srcdir/$tests/ofontd3.typ $tests/xofontd3.typ || rc=13

exit $rc