Debian Codegraph @

texk/web2c/uptexdir/yokotate.test

raw
1 #! /bin/sh -vx
2 # $Id: yokotate.test 75026 2025-04-26 08:08:19Z takuji $
3 # Copyright 2022 Japanese TeX Development Community <[email protected]>
4 # Copyright 2017 Karl Berry <[email protected]>
5 # Copyright 2013 Peter Breitenlohner <[email protected]>
6 # You may freely use, modify and/or distribute this file.
7
8 BinDir=${BinDir:-.}
9 ExeExt=${ExeExt:-}
10 _uppltotf=$BinDir/uppltotf$ExeExt
11 _uptftopl=$BinDir/uptftopl$ExeExt
12
13 test -d uptests || mkdir -p uptests
14
15 TEXMFCNF=$srcdir/../kpathsea
16 export TEXMFCNF
17
18 # Test inputs
19 testdir=$srcdir/uptexdir/tests
20
21 # Testing upPLtoTF/upTFtoPL for umin10 (yoko=horiz) and utmin10 (tate=vert).
22 for font in umin10 utmin10; do
23
24 $_uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \
25 cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 1
26
27 $_uptftopl -charcode-format octal -verbose $testdir/$font.tfm uptests/x$font.pl && \
28 diff $testdir/$font.pl uptests/x$font.pl && echo || exit 2
29
30 done
31
32
33 # Test inputs
34 testdir=$srcdir/uptexdir/tests
35
36 # Testing pPLtoTF/pTFtoPL compatible mode for character range & encoding.
37 for font in chcode; do
38
39 $_uppltotf -kanji=utf8 $testdir/$font.pl uptests/x$font.tfm && \
40 cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 3
41
42 $_uptftopl -kanji=utf8 -charcode-format octal $testdir/$font.tfm uptests/x$font.pl && \
43 diff $testdir/$font.pl uptests/x$font.pl && echo || exit 4
44
45 for enc in utf8 euc sjis jis; do
46
47 $_uppltotf -kanji=$enc $testdir/$font-$enc.pl uptests/x$font-$enc.tfm && \
48 cmp $testdir/$font.tfm uptests/x$font-$enc.tfm && echo || exit 5
49
50 $_uptftopl -kanji=$enc $testdir/$font.tfm uptests/x$font-$enc.pl && \
51 if [ $enc = utf8 ]; then \
52 perl -i".orig" -CD -pe "use utf8; tr/―~∥-¢£¬/—〜‖−¢£¬/" uptests/x$font-$enc.pl; fi && \
53 diff $testdir/$font-$enc.pl uptests/x$font-$enc.pl && echo || exit 6
54
55 if [ $enc = utf8 ]; then
56 $_uppltotf -kanji=$enc uptests/x$font-$enc.pl.orig uptests/x$font-$enc.tfm && \
57 cmp $testdir/$font.tfm uptests/x$font-$enc.tfm && echo || exit 7
58 fi
59
60 done
61 done