diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/dviout-util/chkdvifont.test | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dviout-util/chkdvifont.test')
-rwxr-xr-x | Build/source/texk/dviout-util/chkdvifont.test | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Build/source/texk/dviout-util/chkdvifont.test b/Build/source/texk/dviout-util/chkdvifont.test new file mode 100755 index 00000000000..4d8faf2548b --- /dev/null +++ b/Build/source/texk/dviout-util/chkdvifont.test @@ -0,0 +1,63 @@ +#! /bin/sh -vx +# $Id$ +# Copyright (C) 2018 Japanese TeX Development Community <issue@texjp.org> +# You may freely use, modify and/or distribute this file. + +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= +diff --strip-trailing-cr $testdir/oldindep.cfn $testdir/oldindep.cfn \ + && diffoptCRLF=--strip-trailing-cr || echo + + +## DVI mode + +cp $testdir/oldindep.dvi . && \ + ./chkdvifont -c ./oldindep.dvi > xoldindep.cfn && \ + diff $diffoptCRLF $testdir/oldindep.cfn xoldindep.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 + +# the following tests will not pass for 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!) + +# check VF format +./chkdvifont -c $testdir/upjisr-h.vf > xupjisr-h.cfn && \ + diff $diffoptCRLF $testdir/upjisr-h.cfn xupjisr-h.cfn && echo || exit 5 + +# detect new JFM format +./chkdvifont -c $testdir/uparse.tfm > xuparse.cfn && \ + diff $diffoptCRLF $testdir/uparse.cfn xuparse.cfn && echo || exit 6 +./chkdvifont -c $testdir/skipjfmp.tfm > xskipjfmp.cfn && \ + diff $diffoptCRLF $testdir/skipjfmp.cfn xskipjfmp.cfn && echo || exit 7 +./chkdvifont -c $testdir/upphirakakuw3-h.tfm > xupp3-h.cfn && \ + diff $diffoptCRLF $testdir/upphirakakuw3-h.cfn xupp3-h.cfn && echo || exit 8 +./chkdvifont -c $testdir/upphirakakuw6-h.tfm > xupp6-h.cfn && \ + diff $diffoptCRLF $testdir/upphirakakuw6-h.cfn xupp6-h.cfn && echo || exit 9 + + +exit 0 + |