summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/dvipdfmx-upjf.test
blob: 88a007a4750338bd20c87eda88164072dd708730 (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 2020-2023 Japanese TeX Development Community <issue@texjp.org>
# You may freely use, modify and/or distribute this file.

TEXMFCNF=$srcdir/../kpathsea
TFMFONTS=".;$srcdir/tests;$srcdir/data"
T1FONTS="$srcdir/tests;$srcdir/data"
TEXFONTMAPS="$srcdir/tests;$srcdir/data"
DVIPDFMXINPUTS="$srcdir/tests;$srcdir/data"
TEXPICTS=$srcdir/tests
TEXFONTS=".;$srcdir/tests"
SOURCE_DATE_EPOCH=1588474800
export TEXMFCNF TFMFONTS T1FONTS TEXFONTMAPS DVIPDFMXINPUTS TEXPICTS TEXFONTS SOURCE_DATE_EPOCH

failed=

rm -f upjf.vf upjv.vf upjf-g.ofm upjv-g.ofm upjf-r.ofm upjv-r.ofm upjf-r.tfm

echo "*** dvipdfmx: test for upjf_full.pdf" && echo \
	&& cp $srcdir/tests/upjf_full.vf ./upjf.vf \
	&& cp $srcdir/tests/upjv_full.vf ./upjv.vf \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf.pdf ./upjf_full.pdf \
	&& echo && echo "dvipdfmx-upjf-vf_full tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf-vf_full"

echo "*** dvipdfmx: test for upjf_omit.pdf" && echo \
	&& cp $srcdir/tests/upjf_omit.vf ./upjf.vf \
	&& cp $srcdir/tests/upjv_omit.vf ./upjv.vf \
	&& cp $srcdir/tests/upjf-g00.ofm ./upjf-g.ofm \
	&& cp $srcdir/tests/upjv-g00.ofm ./upjv-g.ofm \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf.pdf ./upjf_omit.pdf \
	&& echo && echo "dvipdfmx-upjf-vf_omit tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf-vf_omit"

cmp ./upjf_full.pdf ./upjf_omit.pdf || failed="$failed dvipdfmx-upjf-cmp"

echo "*** dvipdfmx: test for upjf_omit2.pdf" && echo \
	&& cp $srcdir/tests/upjf-r00.ofm ./upjf-r.ofm \
	&& cp $srcdir/tests/upjv-r00.ofm ./upjv-r.ofm \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf.pdf ./upjf_omit2.pdf \
	&& echo && echo "dvipdfmx-upjf-vf_omit2 tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf-vf_omit2"

cmp ./upjf_full.pdf ./upjf_omit2.pdf || failed="$failed dvipdfmx-upjf-cmp2"


rm -f upjf-r.ofm upjv-r.ofm

echo "*** dvipdfmx: test for upjf1_full.pdf" && echo \
	&& cp $srcdir/tests/upjf1_full.vf ./upjf.vf \
	&& cp $srcdir/tests/upjv_full.vf ./upjv.vf \
	&& cp $srcdir/tests/upjf1-r.tfm ./upjf-r.tfm \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf1.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf1.pdf ./upjf1_full.pdf \
	&& echo && echo "dvipdfmx-upjf1-vf_full tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf1-vf_full"

echo "*** dvipdfmx: test for upjf1_omit.pdf" && echo \
	&& cp $srcdir/tests/upjf1_omit.vf ./upjf.vf \
	&& cp $srcdir/tests/upjv_omit.vf ./upjv.vf \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf1.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf1.pdf ./upjf1_omit.pdf \
	&& echo && echo "dvipdfmx-upjf1-vf_omit tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf1-vf_omit"

cmp ./upjf1_full.pdf ./upjf1_omit.pdf || failed="$failed dvipdfmx-upjf1-cmp"

rm -f upjf-r.tfm

echo "*** dvipdfmx: test for upjf1_omit2.pdf" && echo \
	&& cp $srcdir/tests/upjf-r00.ofm ./upjf-r.ofm \
	&& cp $srcdir/tests/upjv-r00.ofm ./upjv-r.ofm \
	&& ./xdvipdfmx --dvipdfmx -vv --pdfm-str-utf8 -f upjf.map -o upjf1.pdf $srcdir/tests/upjf.dvi \
	&& mv ./upjf1.pdf ./upjf1_omit2.pdf \
	&& echo && echo "dvipdfmx-upjf1-vf_omit2 tests OK" && echo \
	|| failed="$failed dvipdfmx-upjf1-vf_omit2"

cmp ./upjf1_full.pdf ./upjf1_omit2.pdf || failed="$failed dvipdfmx-upjf1-cmp"


test -z "$failed" && exit 0
echo
echo "failed tests:$failed"
exit 1