summaryrefslogtreecommitdiff
path: root/Build/source/texk/dviout-util/chkdvifont.test
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-10-08 05:17:16 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2018-10-08 05:17:16 +0000
commit4035757aa66a5534ccc30eb097fb0845556d56d4 (patch)
tree408675d906512c07d4338d8cd25edfde9abe52de /Build/source/texk/dviout-util/chkdvifont.test
parente1b9cf87baef11b81bea37509a615a39c237559a (diff)
dviout-util: fix bugs, more comprehensive tests
git-svn-id: svn://tug.org/texlive/trunk@48857 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dviout-util/chkdvifont.test')
-rwxr-xr-xBuild/source/texk/dviout-util/chkdvifont.test39
1 files changed, 38 insertions, 1 deletions
diff --git a/Build/source/texk/dviout-util/chkdvifont.test b/Build/source/texk/dviout-util/chkdvifont.test
index 2f0e65bdc2c..d2a76ed5f0e 100755
--- a/Build/source/texk/dviout-util/chkdvifont.test
+++ b/Build/source/texk/dviout-util/chkdvifont.test
@@ -5,9 +5,46 @@
testdir=$srcdir/tests
+# 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)
+diffoptCRLF=--strip-trailing-cr
+diff --strip-trailing-cr $testdir/test.spc $testdir/test.spc \
+ && diffoptCRLF=--strip-trailing-cr || echo
+
+
+## DVI mode
+
cp $testdir/test.dvi . && \
./chkdvifont -c ./test.dvi > xtest.cfn && \
- diff $testdir/test.cfn xtest.cfn && echo || exit 1
+ diff $diffoptCRLF $testdir/test.cfn xtest.cfn && echo || exit 1
+
+
+## TFM/JFM mode
+
+./chkdvifont -c $testdir/jis.tfm > xjis.cfn && \
+ diff $diffoptCRLF $testdir/jis.cfn xjis.cfn && echo || exit 2
+
+# eufm10.tfm is "AMSTeX 2.0 or newer", exit code should be 4
+./chkdvifont -c $testdir/eufm10.tfm > xeufm10.cfn
+ if [ $? -ne 4 ]; then exit 3; fi
+ sed 's!2.0/2.1!2.0 or newer!' xeufm10.cfn > xeufm10.ed.cfn
+ diff $diffoptCRLF $testdir/eufm10.cfn xeufm10.ed.cfn && echo || exit 3
+
+## FONT mode
+
+./chkdvifont -c $testdir/cmr10.pk > xcmr10.cfn && \
+ diff $diffoptCRLF $testdir/cmr10.cfn xcmr10.cfn && echo || exit 4
+
+echo M | ./chkdvifont && echo || exit 0
+
+# VF format is not supported by old version written by SHIMA.
+# that version can be distinguished from the new version by
+# exit code 250 for usage with stdin M. (the above line did it!)
+
+./chkdvifont -c $testdir/upjisr-h.vf > xupjisr-h.cfn && \
+ diff $diffoptCRLF $testdir/upjisr-h.cfn xupjisr-h.cfn && echo || exit 5
exit 0