diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:51:34 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2023-08-13 13:51:34 +0000 |
commit | 5a46d94f1aa14d260c861aa55af6cc3168d81e38 (patch) | |
tree | 5a31af0ca1a6998d30e2f4c61668ed8dd82c8dcb /Build/source/texk | |
parent | a405e79cbeeb1b21b7cd681289d0234915c87e82 (diff) |
ttf2pk: update a test
git-svn-id: svn://tug.org/texlive/trunk@67914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/ttf2pk2/ChangeLog | 4 | ||||
-rwxr-xr-x | Build/source/texk/ttf2pk2/tests/ttf2pk.test | 81 |
2 files changed, 54 insertions, 31 deletions
diff --git a/Build/source/texk/ttf2pk2/ChangeLog b/Build/source/texk/ttf2pk2/ChangeLog index 44b13027fb0..36ac5461c83 100644 --- a/Build/source/texk/ttf2pk2/ChangeLog +++ b/Build/source/texk/ttf2pk2/ChangeLog @@ -1,3 +1,7 @@ +2023-08-13 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * tests/ttf2pk.test: Make easier to test on Windows. + 2021-02-06 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * ttf2pk.c, ttf2tfm.c, configure.ac: diff --git a/Build/source/texk/ttf2pk2/tests/ttf2pk.test b/Build/source/texk/ttf2pk2/tests/ttf2pk.test index ec503f2e1b2..000271c99d1 100755 --- a/Build/source/texk/ttf2pk2/tests/ttf2pk.test +++ b/Build/source/texk/ttf2pk2/tests/ttf2pk.test @@ -4,74 +4,93 @@ # Copyright 2011, 2012 Peter Breitenlohner <tex-live@tug.org> # You may freely use, modify and/or distribute this file. +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_tftopl=tftopl$ExeExt +_pktype=pktype$ExeExt +_ttf2tfm=$BinDir/ttf2tfm$ExeExt +_ttf2pk=$BinDir/ttf2pk$ExeExt + +# pre-generated test results in the repository are stored in LF +# but the output might be written in CRLF on some platform. +# if 'diff --strip-trailing-cr' is available, exploit it. +# (useful for tests on win32 binaries run on MSYS shell) +DIFF="diff" +$DIFF --strip-trailing-cr $0 $0 \ + && DIFF="diff --strip-trailing-cr" || echo + +rc=0 + rm -f GenR-ec.vpl GenR102-* ipaexg-* TEXMFCNF=$srcdir/../kpathsea -TEXFONTS=.:$srcdir/tests +TEXFONTS=".;$srcdir/tests" TTF2PKINPUTS=$srcdir/tests SFDFONTS="$srcdir/data;$srcdir/tests" +PATH=../web2c:$PATH -export TEXMFCNF TEXFONTS TTF2PKINPUTS SFDFONTS +export TEXMFCNF TEXFONTS TTF2PKINPUTS SFDFONTS PATH -./ttf2tfm GenR102 -u -q -N -T gentium-ec -v GenR-ec GenR102-ec >GenR102-ec.map || exit 1 -diff $srcdir/tests/GenR102-ec.map GenR102-ec.map || exit 1 -diff $srcdir/tests/GenR-ec.vpl GenR-ec.vpl || exit 1 +$_ttf2tfm GenR102 -u -q -N -T gentium-ec -v GenR-ec GenR102-ec >GenR102-ec.map || rc=1 +$DIFF $srcdir/tests/GenR102-ec.map GenR102-ec.map || rc=2 +$DIFF $srcdir/tests/GenR-ec.vpl GenR-ec.vpl || rc=3 -./ttf2pk -q GenR102-ec 100 || exit 1 +$_ttf2pk -q GenR102-ec 100 || rc=4 -tftopl GenR102-ec GenR102-ec || exit 77 -diff $srcdir/tests/GenR102-ec.pl GenR102-ec.pl || exit 1 -pktype GenR102-ec.100pk >GenR102-ec.typ || exit 77 +$_tftopl GenR102-ec GenR102-ec || exit 77 +diff $srcdir/tests/GenR102-ec.pl GenR102-ec.pl || rc=5 +$_pktype GenR102-ec.100pk >GenR102-ec.typ || exit 77 echo passed GenR102-ec test -./ttf2tfm GenR102 -q GenR102-h@UBig5@ >GenR102-h.map || exit 1 -diff $srcdir/tests/GenR102-h.map GenR102-h.map || exit 1 +$_ttf2tfm GenR102 -q GenR102-h@UBig5@ >GenR102-h.map || rc=6 +$DIFF $srcdir/tests/GenR102-h.map GenR102-h.map || rc=7 for sf in 00 01 02 24; do - ./ttf2pk -q GenR102-h$sf 100 || exit 1 + $_ttf2pk -q GenR102-h$sf 100 || rc=8 - tftopl GenR102-h$sf GenR102-h$sf || exit 77 - pktype GenR102-h$sf.100pk >GenR102-h$sf.typ || exit 77 + $_tftopl GenR102-h$sf GenR102-h$sf || exit 77 + $_pktype GenR102-h$sf.100pk >GenR102-h$sf.typ || exit 77 done echo passed GenR102-h test -./ttf2tfm GenR102 -q -x GenR102-v@UBig5@ >GenR102-v.map || exit 1 -diff $srcdir/tests/GenR102-v.map GenR102-v.map || exit 1 +$_ttf2tfm GenR102 -q -x GenR102-v@UBig5@ >GenR102-v.map || rc=9 +$DIFF $srcdir/tests/GenR102-v.map GenR102-v.map || rc=10 for sf in 00 01 02 24; do - ./ttf2pk -q GenR102-v$sf 100 || exit 1 + $_ttf2pk -q GenR102-v$sf 100 || rc=11 - tftopl GenR102-v$sf GenR102-v$sf || exit 77 - pktype GenR102-v$sf.100pk >GenR102-v$sf.typ || exit 77 + $_tftopl GenR102-v$sf GenR102-v$sf || exit 77 + $_pktype GenR102-v$sf.100pk >GenR102-v$sf.typ || exit 77 done echo passed GenR102-v test -./ttf2tfm ipaexg -q ipaexg-h@Test@ >ipaexg-h.map || exit 1 -diff $srcdir/tests/ipaexg-h.map ipaexg-h.map || exit 1 +$_ttf2tfm ipaexg -q ipaexg-h@Test@ >ipaexg-h.map || rc=12 +$DIFF $srcdir/tests/ipaexg-h.map ipaexg-h.map || rc=13 -./ttf2pk -q ipaexg-h03 100 || exit 1 +$_ttf2pk -q ipaexg-h03 100 || rc=14 -tftopl ipaexg-h03 ipaexg-h03 || exit 77 -diff $srcdir/tests/ipaexg-h03.pl ipaexg-h03.pl || exit 1 -pktype ipaexg-h03.100pk >ipaexg-h03.typ || exit 77 +$_tftopl ipaexg-h03 ipaexg-h03 || exit 77 +diff $srcdir/tests/ipaexg-h03.pl ipaexg-h03.pl || rc=15 +$_pktype ipaexg-h03.100pk >ipaexg-h03.typ || exit 77 echo passed ipaexg-h test -./ttf2tfm ipaexg -q -x ipaexg-v@Test@ >ipaexg-v.map || exit 1 -diff $srcdir/tests/ipaexg-v.map ipaexg-v.map || exit 1 +$_ttf2tfm ipaexg -q -x ipaexg-v@Test@ >ipaexg-v.map || rc=16 +$DIFF $srcdir/tests/ipaexg-v.map ipaexg-v.map || rc=17 -./ttf2pk -q ipaexg-v03 100 || exit 1 +$_ttf2pk -q ipaexg-v03 100 || rc=18 -tftopl ipaexg-v03 ipaexg-v03 || exit 77 -diff $srcdir/tests/ipaexg-v03.pl ipaexg-v03.pl || exit 1 -pktype ipaexg-v03.100pk >ipaexg-v03.typ || exit 77 +$_tftopl ipaexg-v03 ipaexg-v03 || exit 77 +diff $srcdir/tests/ipaexg-v03.pl ipaexg-v03.pl || rc=19 +$_pktype ipaexg-v03.100pk >ipaexg-v03.typ || exit 77 echo passed ipaexg-v test +exit $rc |