blob: 3b3105f06f53e7bf3e479c272cd169e7c9647d43 (
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
#! /bin/sh -vx
# $Id$
# Copyright 2024 Japanese TeX Development Community <issue@texjp.org>
# You may freely use, modify and/or distribute this file.
# most imput files were copied from ../../dvipsk/testdata/
KpsDir=${KpsDir:-../kpathsea}
BinDir=${BinDir:-./dvisvgm-src/src}
ExeExt=${ExeExt:-}
_kpsewhich=$KpsDir/kpsewhich$ExeExt
_dvisvgm=$BinDir/dvisvgm$ExeExt
TEXMFCNF=$srcdir/../kpathsea
TFMFONTS=".;$srcdir/dvisvgm-src/tests/data;$srcdir/tests"
VFFONTS=".;$srcdir/tests"
T1FONTS="$srcdir/dvisvgm-src/tests/data"
TEXFONTMAPS="$srcdir/dvisvgm-src/tests/data;$srcdir/tests"
export TEXMFCNF TFMFONTS VFFONTS T1FONTS TEXFONTMAPS
rm -f ./upjf*.svg
failed=
echo "*** dvisvgm: test for upjf_full" && echo \
&& cp $srcdir/tests/upjf_full.vf ./upjf.vf \
&& cp $srcdir/tests/upjv_full.vf ./upjv.vf \
&& $_dvisvgm --verbosity=7 -m upjf.map -o upjf_full.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf_full"
diff ./upjf_full.svg $srcdir/tests/upjf.svg || failed="$failed upjf_full-cmp"
echo "*** dvisvgm: test for upjf1_full" && echo \
&& cp $srcdir/tests/upjf1_full.vf ./upjf.vf \
&& $_dvisvgm --verbosity=7 -m upjf.map -o upjf1_full.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf1_full"
diff ./upjf1_full.svg $srcdir/tests/upjf1.svg || failed="$failed upjf1_full-cmp"
test -n "$failed" && { echo; echo "failed tests:$failed"; exit 1; }
##### following tests require Haranoaji fonts #####
$_kpsewhich HaranoAjiMincho-Regular.otf
otfpath=`$_kpsewhich HaranoAjiMincho-Regular.otf` || exit 77
OPENTYPEFONTS=`echo $otfpath | sed -e 's,HaranoAjiMincho-Regular\.otf,,' -e 's,/fonts/opentype/.*$,/fonts/opentype//,'`
export OPENTYPEFONTS
echo "*** dvisvgm: test for upjf_full" && echo \
&& cp $srcdir/tests/upjf_full.vf ./upjf.vf \
&& cp $srcdir/tests/upjv_full.vf ./upjv.vf \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf_full1.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf_full1"
echo "*** dvisvgm: test for upjf1_full" && echo \
&& cp $srcdir/tests/upjf1_full.vf ./upjf.vf \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf1_full1.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf1_full1"
echo "*** dvisvgm: test for upjf_omit" && echo \
&& cp $srcdir/tests/upjf_omit.vf ./upjf.vf \
&& cp $srcdir/tests/upjv_omit.vf ./upjv.vf \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf_omit.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf_omit"
diff ./upjf_omit.svg ./upjf_full1.svg || failed="$failed upjf_omit-cmp"
echo "*** dvisvgm: test for upjf1_omit" && echo \
&& cp $srcdir/tests/upjf1_omit.vf ./upjf.vf \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf1_omit.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf1_omit"
diff ./upjf1_omit.svg ./upjf1_full1.svg || failed="$failed upjf1_omit-cmp"
echo "*** dvisvgm: test for upjf_omit2" && echo \
&& cp $srcdir/tests/upjf_omit.vf ./upjf.vf \
&& cp $srcdir/tests/upjf-r00.ofm ./upjf-r.ofm \
&& cp $srcdir/tests/upjv-r00.ofm ./upjv-r.ofm \
&& cp $srcdir/tests/upjf-g00.ofm ./upjf-g.ofm \
&& cp $srcdir/tests/upjv-g00.ofm ./upjv-g.ofm \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf_omit2.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf_omit2"
diff ./upjf_omit2.svg ./upjf_full1.svg || failed="$failed upjf_omit2-cmp"
echo "*** dvisvgm: test for upjf1_omit2" && echo \
&& cp $srcdir/tests/upjf1_omit.vf ./upjf.vf \
&& $_dvisvgm --verbosity=7 -m upjf-hara.map -o upjf1_omit2.svg $srcdir/tests/upjf.dvi \
&& echo || failed="$failed upjf1_omit2"
diff ./upjf1_omit2.svg ./upjf1_full1.svg || failed="$failed upjf1_omit2-cmp"
test -z "$failed" && exit 0
echo
echo "failed tests:$failed"
exit 2
|