summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-10 02:02:05 +0000
committerKarl Berry <karl@freefriends.org>2021-02-10 02:02:05 +0000
commit24cb982c28c6120d310d53b7e8d059d544dac5e5 (patch)
tree13e396617991f7f4df47cfda290e8925c7807b8a /Build/source
parentc40085b58cf27d0e9c8afccf10522d4f3e541b13 (diff)
test afm2tfm -p, redo test as shell script
git-svn-id: svn://tug.org/texlive/trunk@57697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog6
-rw-r--r--Build/source/texk/dvipsk/Makefile.am16
-rw-r--r--Build/source/texk/dvipsk/Makefile.in10
-rwxr-xr-xBuild/source/texk/dvipsk/afm2tfm-test.pl19
-rwxr-xr-xBuild/source/texk/dvipsk/test-afm2tfm.test40
-rwxr-xr-xBuild/source/texk/dvipsk/test-missing-image.test2
6 files changed, 60 insertions, 33 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index f1df5c24fca..b34a79694ef 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-09 Karl Berry <karl@freefriends.org>
+
+ * test-afm2tfm.test: rewrite as shell script.
+ * afm2tfm-test.pl: remove.
+ * Makefile.am (TESTS, etc.): adapt accordingly.
+
2021-02-08 Karl Berry <karl@freefriends.org>
* configure.ac (AC_INIT): TeX Live not TeXLive.
diff --git a/Build/source/texk/dvipsk/Makefile.am b/Build/source/texk/dvipsk/Makefile.am
index 58667b4f3c5..cc27e1e01bd 100644
--- a/Build/source/texk/dvipsk/Makefile.am
+++ b/Build/source/texk/dvipsk/Makefile.am
@@ -111,10 +111,10 @@ EXTRA_DIST = $(dist_prologues) texc.script
CLEANFILES = $(prologues) texc.lpro
-## dvips tests
+## dvips/afm2tfm tests
TEST_EXTENSIONS = .pl .test
-TESTS = afm2tfm-test.pl
-afm2tfm-test.log: afm2tfm$(EXEEXT)
+TESTS = test-afm2tfm.test
+test-afm2tfm-test.log: afm2tfm$(EXEEXT)
TESTS += beginfontk1.test eepic-nan.test pfbincl.test \
quotecmd-test.pl same-name.test test-dvips.test \
test-missing-image.test test-overflow-buffers.test uptex-vf.test
@@ -158,8 +158,6 @@ EXTRA_DIST += \
testdata/texc.pro \
testdata/texps.pro
-## afm2tfm-test.pl
-DISTCLEANFILES += afmtest.tfm
## beginfontk1.test
EXTRA_DIST += testdata/beginfontk1.dvi testdata/beginfontk1.eps testdata/beginfontk1.tex
DISTCLEANFILES += beginfontk1.ps
@@ -174,13 +172,15 @@ EXTRA_DIST += testdata/quotecmd.dvi testdata/quotecmd.tex
DISTCLEANFILES += *badnews*
## same-name.test
DISTCLEANFILES += same-name.out
-## test-dvips
+## test-afm2tfm.test
+DISTCLEANFILES += afmtest.tfm
+## test-dvips.test
EXTRA_DIST += testdata/dvipstst.tex testdata/dvipstst.xdv testdata/dvipstst.xps
DISTCLEANFILES += dvipstst.ps missfont.log mtest.ps
-## test-missing-image
+## test-missing-image.test
EXTRA_DIST += testdata/missing-image.tex testdata/missing-image.dvi
DISTCLEANFILES += missing-image.ps
-## test-overflow-buffers
+## test-overflow-buffers.test
EXTRA_DIST += overflow-color-push.dvi overflow-color-push.tex \
overflow-epsfile.dvi overflow-epsfile.tex \
overflow-psbox.dvi overflow-psbox.tex
diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in
index 6bacfe0f7ed..b5707d69c9a 100644
--- a/Build/source/texk/dvipsk/Makefile.in
+++ b/Build/source/texk/dvipsk/Makefile.in
@@ -719,9 +719,9 @@ LDADD = $(KPATHSEA_LIBS)
dist_man1_MANS = afm2tfm.1 dvips.1
info_TEXINFOS = dvips.texi
dvips_TEXINFOS = contrib/config.proto dvips.help
-DISTCLEANFILES = $(DVIS) $(PSS) afmtest.tfm beginfontk1.ps \
- eepic-nan.ps pfbincl.ps *badnews* same-name.out dvipstst.ps \
- missfont.log mtest.ps missing-image.ps overflow-color-push.ps \
+DISTCLEANFILES = $(DVIS) $(PSS) beginfontk1.ps eepic-nan.ps pfbincl.ps \
+ *badnews* same-name.out afmtest.tfm dvipstst.ps missfont.log \
+ mtest.ps missing-image.ps overflow-color-push.ps \
overflow-epsfile.ps overflow-psbox.ps upjf.vf upjf_full.ps \
upjf_omit.ps
enc_DATA = dvips-all.enc
@@ -771,7 +771,7 @@ EXTRA_DIST = $(dist_prologues) texc.script $(TESTS) testdata/8r.enc \
vmcms vms
CLEANFILES = $(prologues) texc.lpro
TEST_EXTENSIONS = .pl .test
-TESTS = afm2tfm-test.pl beginfontk1.test eepic-nan.test pfbincl.test \
+TESTS = test-afm2tfm.test beginfontk1.test eepic-nan.test pfbincl.test \
quotecmd-test.pl same-name.test test-dvips.test \
test-missing-image.test test-overflow-buffers.test \
uptex-vf.test
@@ -2004,7 +2004,7 @@ $(prologues): squeeze/stamp-squeeze
squeeze/stamp-squeeze:
cd squeeze && $(MAKE) $(AM_MAKEFLAGS) stamp-squeeze
-afm2tfm-test.log: afm2tfm$(EXEEXT)
+test-afm2tfm-test.log: afm2tfm$(EXEEXT)
beginfontk1.log eepic-nan.log pfbincl.log \
quotecmd-test.log same-name.log test-dvips.log \
test-overflow-buffers.log: dvips$(EXEEXT)
diff --git a/Build/source/texk/dvipsk/afm2tfm-test.pl b/Build/source/texk/dvipsk/afm2tfm-test.pl
deleted file mode 100755
index 69704ae0f0d..00000000000
--- a/Build/source/texk/dvipsk/afm2tfm-test.pl
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env perl
-# $Id$
-# Public domain. Originally written 2010, Karl Berry.
-# Check that afm2tfm functions at all.
-
-BEGIN { chomp ($srcdir = $ENV{"srcdir"} || `dirname $0`); }
-require "$srcdir/../tests/common-test.pl";
-
-exit (&main ());
-
-sub main
-{
- my $outfile = "afmtest.tfm";
- my @args = ("afmtest.afm", $outfile); # should be found via kpse
- my $ret = &test_run ("./afm2tfm", @args);
-
- my $bad = ! -f $outfile; # tfm should have been created
- return $bad;
-}
diff --git a/Build/source/texk/dvipsk/test-afm2tfm.test b/Build/source/texk/dvipsk/test-afm2tfm.test
new file mode 100755
index 00000000000..769aaa25910
--- /dev/null
+++ b/Build/source/texk/dvipsk/test-afm2tfm.test
@@ -0,0 +1,40 @@
+#! /bin/sh -vx
+# $Id: test-dvips.test 45809 2017-11-15 00:36:56Z karl $
+# Public domain. Originally written 2010, Karl Berry.
+# Check that afm2tfm functions.
+#
+# BTW, to run just this test on its own:
+# make -C $wp TESTS=test-afm2tfm.test check
+# where wp=.../Work/texk/dvipsk
+
+test_file=afmtest.afm
+test_dir=$srcdir/../tests/texmf
+test_input=$test_dir/$test_file
+if test ! -r "$test_input"; then # probably srcdir messed up
+ echo "$0: goodbye, cannot find test input: $test_input" >&2
+ exit 1
+fi
+
+AFMFONTS=$test_dir; export AFMFONTS
+
+# run afm2tfm, assumed on $test_file so we can check the output.
+do_check () {
+ if "$@"; then :; else
+ echo "$0: "$@" "$test_file" failed, goodbye." >&2
+ exit 1
+ fi
+
+ tfm=`basename "$test_file" .afm`.tfm
+ if test ! -s "$tfm"; then
+ echo "$0: tfm empty or not created, goodbye." >&2
+ ls -l "$tfm" >&2
+ exit 1
+ fi
+
+ # could run tftopl, but let's not assume it.
+}
+
+do_check ./afm2tfm "$test_file"
+do_check ./afm2tfm "$test_file" -p $srcdir/testdata/8r.enc # options after
+
+exit 0
diff --git a/Build/source/texk/dvipsk/test-missing-image.test b/Build/source/texk/dvipsk/test-missing-image.test
index 689d807b8fa..a7aaa32b6d3 100755
--- a/Build/source/texk/dvipsk/test-missing-image.test
+++ b/Build/source/texk/dvipsk/test-missing-image.test
@@ -3,7 +3,7 @@
# Public domain. Test that dvips exits with bad status when there is a
# missing image file.
#
-# BTW, to just run this test on its own:
+# BTW, to run just this test on its own:
# make -C $wp TESTS=test-missing-image.test check
# where wp=.../Work/texk/dvipsk