blob: a9e39ece98584d14ebeccbcae1602ec734734f6f (
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
|
#! /bin/sh -vx
#
# Copyright 2022 Japanese TeX Development Community <issue@texjp.org>
# You may freely use, modify and/or distribute this file.
test -d ptests || mkdir -p ptests
rm -f ptests/fn*.log ptests/fn*.txt ptests/fn*.tex fn*.tex
rc=0
TEXMFCNF=$srcdir/../kpathsea
TEXINPUTS=ptests:.
export TEXMFCNF TEXINPUTS
perl $srcdir/tests/fn-generate.perl || exit 128
mv fn*.tex ptests/
# pTeX internal encoding
fenc="utf8"
for ienc in euc sjis; do
for doc in fn-$fenc fnさざ波-$fenc; do
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
./ptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >ptests/$doc-$ienc-term.log || rc=1
mv $doc-$ienc.txt $doc-$ienc.log $doc-tmp.tex ptests/
diff ptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=2
done
done
# pTeX, regacy encoding
for fenc in sjis euc; do
for doc in fnさざ波-$fenc; do
ienc=$fenc
if [ "$COMSPEC" != "" ]; then
echo "*** We guess OS is Windows."
if [ $fenc != euc ]; then ienc="sjis"; fi
else
echo "*** We guess OS is not Windows."
if [ $fenc != sjis ]; then ienc="euc"; fi
fi
echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc
./ptex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >ptests/$doc-$fenc-term.log || rc=3
mv $doc-$ienc.txt $doc-$ienc.log $doc-tmp.tex ptests/
diff ptests/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || rc=4
done
done
exit $rc
|