Debian Codegraph @

texk/web2c/omegaware/odvicopy.test

raw
1 #! /bin/sh -vx
2 # $Id: odvicopy.test 67982 2023-08-19 15:10:25Z takuji $
3 # Copyright 2017-2018 Karl Berry <[email protected]>
4 # Copyright 2009-2015 Peter Breitenlohner <[email protected]>
5 # You may freely use, modify and/or distribute this file.
6
7 BinDir=${BinDir:-.}
8 ExeExt=${ExeExt:-}
9 _odvicopy=$BinDir/odvicopy$ExeExt
10 _odvitype=$BinDir/odvitype$ExeExt
11
12 LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
13
14 tests=omegaware/tests
15
16 test -d $tests || mkdir -p $tests
17 rc=0
18
19 echo && echo "*** odvicopy -help"
20 $_odvicopy -help || rc=1
21
22 echo && echo "*** odvicopy -version"
23 $_odvicopy -version || rc=2
24
25 # Test page selection
26 #
27 echo && echo "*** odvicopy --p=*.*.2 --max=1 pagenum.dvi xpagenum.dvi >xpagenum.log"
28 TEXMFCNF=$srcdir/../kpathsea \
29 TFMFONTS=$srcdir/tests \
30 $_odvicopy --p=\*.\*.2 --max=1 $srcdir/tests/pagenum.dvi $tests/xpagenum.dvi \
31 >$tests/xpagenum.log || rc=3
32
33 echo && echo "*** grep '1 page written\.$' xpagenum.log"
34 grep '1 page written\.$' $tests/xpagenum.log || rc=4
35
36 # First a straight copy
37 #
38 rm -f ofont*vf
39
40 echo && echo "*** odvicopy ofontd0 xofontd1 (without VF/OVF files)"
41 TEXMFCNF=$srcdir/../kpathsea \
42 OFMFONTS=$srcdir/$tests \
43 OVFFONTS=. \
44 $_odvicopy $srcdir/$tests/ofontd0 $tests/xofontd1 || rc=5
45
46 echo && echo "*** odvitype xofontd1 >xofontd1.typ"
47 TEXMFCNF=$srcdir/../kpathsea \
48 OFMFONTS=$srcdir/$tests \
49 $_odvitype $tests/xofontd1 | sed '1s/ (.*)$//' >$tests/xofontd1.typ || rc=6
50
51 diff $srcdir/$tests/ofontd1.typ $tests/xofontd1.typ || rc=7
52
53 # Next with VF/OVF files for ofontv[4-6]
54 #
55 cp $srcdir/$tests/ofontv*vf .
56
57 echo && echo "*** odvicopy ofontd1 xofontd2 (with VF/OVF files for ofontv[4-6])"
58 TEXMFCNF=$srcdir/../kpathsea \
59 OFMFONTS=$srcdir/$tests \
60 OVFFONTS=. \
61 $_odvicopy $tests/xofontd1 $tests/xofontd2 || rc=8
62
63 echo && echo "*** odvitype xofontd2 >xofontd2.typ"
64 TEXMFCNF=$srcdir/../kpathsea \
65 OFMFONTS=$srcdir/$tests \
66 $_odvitype $tests/xofontd2 | sed '1s/ (.*)$//' >$tests/xofontd2.typ || rc=9
67
68 diff $srcdir/$tests/ofontd2.typ $tests/xofontd2.typ || rc=10
69
70 # Finally with VF/OVF files for ofontr[1-3] and ofontv[4-6]
71 #
72 cp $srcdir/$tests/ofontr*vf .
73
74 echo && echo "*** odvicopy ofontd0 xofontd3 (with VF/OVF files for ofontr[1-3] and ofontv[4-6])"
75 TEXMFCNF=$srcdir/../kpathsea \
76 OFMFONTS=$srcdir/$tests \
77 OVFFONTS=. \
78 $_odvicopy $srcdir/$tests/ofontd0 $tests/xofontd3 || rc=11
79
80 echo && echo "*** odvitype xofontd3 >xofontd3.typ"
81 TEXMFCNF=$srcdir/../kpathsea \
82 OFMFONTS=$srcdir/$tests \
83 $_odvitype $tests/xofontd3 | sed '1s/ (.*)$//' >$tests/xofontd3.typ || rc=12
84
85 diff $srcdir/$tests/ofontd3.typ $tests/xofontd3.typ || rc=13
86
87 exit $rc
88