summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-08-06 09:37:05 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-08-06 09:37:05 +0000
commitf231a5d58023c8f1319480643976f01b3b8797d3 (patch)
treef5f526d2de916574507a91ad064cbe06057056f6 /Build/source/texk
parent23efce276c60a5a2f3b2f1decb9a17fc894df597 (diff)
dvipdfm-x: Additional tests. Bugfix from Akira
git-svn-id: svn://tug.org/texlive/trunk@31363 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog11
-rw-r--r--Build/source/texk/dvipdfm-x/Makefile.am12
-rw-r--r--Build/source/texk/dvipdfm-x/Makefile.in21
-rw-r--r--Build/source/texk/dvipdfm-x/dvi.c12
-rwxr-xr-xBuild/source/texk/dvipdfm-x/dvipdfm-ann.test25
-rw-r--r--Build/source/texk/dvipdfm-x/dvipdfmx.c19
-rwxr-xr-xBuild/source/texk/dvipdfm-x/dvipdfmx.test4
-rw-r--r--Build/source/texk/dvipdfm-x/tests/cmr10.pfbbin0 -> 26882 bytes
-rw-r--r--Build/source/texk/dvipdfm-x/tests/cmr10.tfmbin0 -> 1296 bytes
-rw-r--r--Build/source/texk/dvipdfm-x/tests/dvipdfmx.cfg2
-rw-r--r--Build/source/texk/dvipdfm-x/tests/grahn.dvibin0 -> 328 bytes
-rw-r--r--Build/source/texk/dvipdfm-x/tests/grahn.tex8
-rw-r--r--Build/source/texk/dvipdfm-x/tests/psfonts.map1
-rwxr-xr-xBuild/source/texk/dvipdfm-x/xdvipdfm-ann.test25
-rwxr-xr-xBuild/source/texk/dvipdfm-x/xdvipdfmx.test4
15 files changed, 103 insertions, 41 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index fea798b1cd3..820afc6506d 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,14 @@
+2013-08-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * (x)dvipdfm-ann.test: Additional tests.
+ * tests/cmr10.{pfb,tfm}, tests/grahn.{dvi,tex},
+ tests/psfonts.map: Additional test input files.
+ * Makefile.am, dvipdfmx.cfg: Adapted.
+
+ Bugfix from Akira:
+ * dvi.c, xdvipdfmx.c: May need to append ".dvi" to dvi_filename.
+ * xdvipdfmx.c: At the moment dvipdfmx can not read stdin.
+
2013-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
* pdfobj.c (pdf_open): Bugfix: Always set pf->catalog.
diff --git a/Build/source/texk/dvipdfm-x/Makefile.am b/Build/source/texk/dvipdfm-x/Makefile.am
index 2df80918ece..d974f56834c 100644
--- a/Build/source/texk/dvipdfm-x/Makefile.am
+++ b/Build/source/texk/dvipdfm-x/Makefile.am
@@ -270,21 +270,25 @@ DISTCLEANFILES = config.force
## Tests
##
TESTS =
-dvipdfmx_tests = dvipdfmx.test dvipdfm-bb.test
+dvipdfmx_tests = dvipdfmx.test dvipdfm-ann.test dvipdfm-bb.test
if DVIPDFMX
TESTS += $(dvipdfmx_tests)
endif DVIPDFMX
-xdvipdfmx_tests = xdvipdfmx.test xdvipdfm-bb.test
+xdvipdfmx_tests = xdvipdfmx.test xdvipdfm-ann.test xdvipdfm-bb.test
if XDVIPDFMX
TESTS += $(xdvipdfmx_tests)
endif XDVIPDFMX
EXTRA_DIST = $(dvipdfmx_tests) $(xdvipdfmx_tests)
+##
+## FIXME
+XFAIL_TESTS = dvipdfm-ann.test xdvipdfm-ann.test
## Test Data
##
-EXTRA_DIST += tests/dvipdfmx.cfg
+EXTRA_DIST += tests/dvipdfmx.cfg tests/psfonts.map
EXTRA_DIST += tests/image.jpeg tests/imgjpeg.bb tests/imgjpeg.xbb tests/picjpeg.bb tests/picjpeg.xbb
EXTRA_DIST += tests/image.pdf tests/imgpdf.bb tests/imgpdf.xbb tests/picpdf.bb tests/picpdf.xbb
EXTRA_DIST += tests/image.png tests/imgpng.bb tests/imgpng.xbb tests/picpng.bb tests/picpng.xbb
EXTRA_DIST += tests/image.dvi tests/image.tex
-DISTCLEANFILES += img*.* pic*.* image*.pdf
+EXTRA_DIST += tests/cmr10.pfb tests/cmr10.tfm tests/grahn.dvi tests/grahn.tex
+DISTCLEANFILES += img*.* pic*.* image*.pdf grahn*.pdf
diff --git a/Build/source/texk/dvipdfm-x/Makefile.in b/Build/source/texk/dvipdfm-x/Makefile.in
index f41eedff044..4b250a759b2 100644
--- a/Build/source/texk/dvipdfm-x/Makefile.in
+++ b/Build/source/texk/dvipdfm-x/Makefile.in
@@ -831,17 +831,20 @@ mapdatadir = $(datarootdir)/texmf-dist/fonts/map/dvipdfmx
dist_mapdata_DATA = data/cid-x.map
cmapdatadir = $(datarootdir)/texmf-dist/fonts/cmap/dvipdfmx
dist_cmapdata_DATA = data/EUC-UCS2
-DISTCLEANFILES = config.force img*.* pic*.* image*.pdf
+DISTCLEANFILES = config.force img*.* pic*.* image*.pdf grahn*.pdf
TESTS = $(am__append_5) $(am__append_6)
-dvipdfmx_tests = dvipdfmx.test dvipdfm-bb.test
-xdvipdfmx_tests = xdvipdfmx.test xdvipdfm-bb.test
+dvipdfmx_tests = dvipdfmx.test dvipdfm-ann.test dvipdfm-bb.test
+xdvipdfmx_tests = xdvipdfmx.test xdvipdfm-ann.test xdvipdfm-bb.test
EXTRA_DIST = $(dvipdfmx_tests) $(xdvipdfmx_tests) tests/dvipdfmx.cfg \
- tests/image.jpeg tests/imgjpeg.bb tests/imgjpeg.xbb \
- tests/picjpeg.bb tests/picjpeg.xbb tests/image.pdf \
- tests/imgpdf.bb tests/imgpdf.xbb tests/picpdf.bb \
- tests/picpdf.xbb tests/image.png tests/imgpng.bb \
- tests/imgpng.xbb tests/picpng.bb tests/picpng.xbb \
- tests/image.dvi tests/image.tex
+ tests/psfonts.map tests/image.jpeg tests/imgjpeg.bb \
+ tests/imgjpeg.xbb tests/picjpeg.bb tests/picjpeg.xbb \
+ tests/image.pdf tests/imgpdf.bb tests/imgpdf.xbb \
+ tests/picpdf.bb tests/picpdf.xbb tests/image.png \
+ tests/imgpng.bb tests/imgpng.xbb tests/picpng.bb \
+ tests/picpng.xbb tests/image.dvi tests/image.tex \
+ tests/cmr10.pfb tests/cmr10.tfm tests/grahn.dvi \
+ tests/grahn.tex
+XFAIL_TESTS = dvipdfm-ann.test xdvipdfm-ann.test
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c
index 6a51e118776..25bdbe6e7eb 100644
--- a/Build/source/texk/dvipdfm-x/dvi.c
+++ b/Build/source/texk/dvipdfm-x/dvi.c
@@ -542,7 +542,6 @@ get_dvi_info (long post_location)
}
}
-#ifdef XETEX
static void
get_preamble_dvi_info (void)
{
@@ -583,7 +582,6 @@ get_preamble_dvi_info (void)
num_pages = 0x7FFFFFFUL; /* for linear processing: we just keep going! */
}
-#endif
const char *
dvi_comment (void)
@@ -2257,8 +2255,7 @@ dvi_init (char *dvi_filename, double mag)
{
long post_location;
-#ifdef XETEX
- if (dvi_filename == NULL) { /* no filename: reading from stdin, probably a pipe */
+ if (!dvi_filename) { /* no filename: reading from stdin, probably a pipe */
#ifdef WIN32
setmode(fileno(stdin), _O_BINARY);
#endif
@@ -2267,12 +2264,8 @@ dvi_init (char *dvi_filename, double mag)
get_preamble_dvi_info();
do_scales(mag);
- }
- else
-#endif
- {
+ } else {
dvi_file = MFOPEN(dvi_filename, FOPEN_RBIN_MODE);
-#ifdef XETEX
if (!dvi_file) {
char *p;
p = strrchr(dvi_filename, '.');
@@ -2291,7 +2284,6 @@ dvi_init (char *dvi_filename, double mag)
#endif
}
}
-#endif
if (!dvi_file) {
ERROR("Could not open specified DVI%s file: %s",
is_xetex ? " (or XDV)" : "", dvi_filename);
diff --git a/Build/source/texk/dvipdfm-x/dvipdfm-ann.test b/Build/source/texk/dvipdfm-x/dvipdfm-ann.test
new file mode 100755
index 00000000000..f574bd4da81
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/dvipdfm-ann.test
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Not really a test, just making sure the program executes.
+
+TEXMFCNF=${srcdir}/../kpathsea
+TEXFONTS=${srcdir}/tests:${srcdir}/data
+DVIPDFMXINPUTS=${srcdir}/tests:${srcdir}/data
+TEXPICTS=${srcdir}/tests
+export TEXMFCNF TEXFONTS DVIPDFMXINPUTS TEXPICTS
+
+failed=
+
+echo "*** dvipdfmx -v -o grahn1.pdf grahn" && echo \
+ && ./dvipdfmx -v -o grahn1.pdf ${srcdir}/tests/grahn \
+ && echo && echo "dvipdfmx-ann tests OK" && echo \
+ || failed="$failed dvipdfmx-ann"
+
+test -z "$failed" && exit 0
+echo
+echo "failed tests:$failed"
+exit 1
+
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c
index 130c83d0e82..be4dea99a43 100644
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c
@@ -171,7 +171,8 @@ show_version (void)
static void
show_usage (void)
{
- fprintf (stdout, "\nUsage: " PROGNAME " [options] [dvifile%s]\n", is_xetex ? "" : "[.dvi]");
+ fprintf (stdout, "\nUsage: " PROGNAME " [options] %sdvifile[.dvi%s]\n",
+ is_xetex ? "[" : "" , is_xetex ? "|.xdv]" : "");
fprintf (stdout, " " PROGNAME " --extractbb|--xbb|--ebb [options]\tBe \"extractbb\"\n");
fprintf (stdout, " " PROGNAME " --help|--version\n");
fprintf (stdout, "\nOptions:\n");
@@ -642,16 +643,8 @@ do_args (int argc, char *argv[])
fprintf(stderr, "Multiple dvi filenames?");
usage();
} else if (argc > 0) {
- char *ext;
- if (mp_mode || is_xetex ||
- ((ext = strrchr(argv[0], '.')) && FILESTRCASEEQ(".dvi", ext))) {
- dvi_filename = NEW(strlen(argv[0]) + 1, char);
- strcpy(dvi_filename, argv[0]);
- } else {
- dvi_filename = NEW(strlen(argv[0]) + 5, char);
- strcpy(dvi_filename, argv[0]);
- strcat(dvi_filename, ".dvi");
- }
+ dvi_filename = NEW(strlen(argv[0]) + 5, char); /* space to append ".dvi" */
+ strcpy(dvi_filename, argv[0]);
}
}
@@ -948,11 +941,15 @@ main (int argc, char *argv[])
dpx_delete_old_cache(image_cache_life);
if (!dvi_filename) {
+#ifdef XETEX
if (verbose)
MESG("No dvi filename specified, reading standard input.\n");
if (!pdf_filename)
if (verbose)
MESG("No pdf filename specified, writing to standard output.\n");
+#else
+ ERROR("dvipdfmx needs an input dvi file!");
+#endif
} else if (!pdf_filename)
set_default_pdf_filename();
diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.test b/Build/source/texk/dvipdfm-x/dvipdfmx.test
index fa70743f7b7..4fb17db507c 100755
--- a/Build/source/texk/dvipdfm-x/dvipdfmx.test
+++ b/Build/source/texk/dvipdfm-x/dvipdfmx.test
@@ -3,10 +3,8 @@
# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
-# Not really a test, just making sure the program executes.
-
TEXMFCNF=${srcdir}/../kpathsea
-TEXFONTS=${srcdir}/data
+TEXFONTS=${srcdir}/tests:${srcdir}/data
DVIPDFMXINPUTS=${srcdir}/tests:${srcdir}/data
TEXPICTS=${srcdir}/tests
export TEXMFCNF TEXFONTS DVIPDFMXINPUTS TEXPICTS
diff --git a/Build/source/texk/dvipdfm-x/tests/cmr10.pfb b/Build/source/texk/dvipdfm-x/tests/cmr10.pfb
new file mode 100644
index 00000000000..337b4b58c45
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/tests/cmr10.pfb
Binary files differ
diff --git a/Build/source/texk/dvipdfm-x/tests/cmr10.tfm b/Build/source/texk/dvipdfm-x/tests/cmr10.tfm
new file mode 100644
index 00000000000..6594c9c4a7f
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/tests/cmr10.tfm
Binary files differ
diff --git a/Build/source/texk/dvipdfm-x/tests/dvipdfmx.cfg b/Build/source/texk/dvipdfm-x/tests/dvipdfmx.cfg
index e7efa05ad0c..c3a2843b66a 100644
--- a/Build/source/texk/dvipdfm-x/tests/dvipdfmx.cfg
+++ b/Build/source/texk/dvipdfm-x/tests/dvipdfmx.cfg
@@ -206,7 +206,7 @@ D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=
%% teTeX 2.x and TeX Live using updmap (DVIPS format)
%% MiKTeX 2.2 and 2.3
-%f psfonts.map
+f psfonts.map
%% Put additional fontmap files here (usually for Type0 fonts)
f cid-x.map
diff --git a/Build/source/texk/dvipdfm-x/tests/grahn.dvi b/Build/source/texk/dvipdfm-x/tests/grahn.dvi
new file mode 100644
index 00000000000..39cbb802741
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/tests/grahn.dvi
Binary files differ
diff --git a/Build/source/texk/dvipdfm-x/tests/grahn.tex b/Build/source/texk/dvipdfm-x/tests/grahn.tex
new file mode 100644
index 00000000000..eda2974a6fb
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/tests/grahn.tex
@@ -0,0 +1,8 @@
+%
+\special{pdf:obj @tug <</S/URI /URI (http://www.tug.org)>>}
+
+\special{pdf:bann <</Subtype/Link /A @tug>>}%
+TUG on the web
+\special{pdf:eann}%
+
+\bye
diff --git a/Build/source/texk/dvipdfm-x/tests/psfonts.map b/Build/source/texk/dvipdfm-x/tests/psfonts.map
new file mode 100644
index 00000000000..2a799870993
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/tests/psfonts.map
@@ -0,0 +1 @@
+cmr10 CMR10 <cmr10.pfb
diff --git a/Build/source/texk/dvipdfm-x/xdvipdfm-ann.test b/Build/source/texk/dvipdfm-x/xdvipdfm-ann.test
new file mode 100755
index 00000000000..bdb35cad5f3
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/xdvipdfm-ann.test
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+# Not really a test, just making sure the program executes.
+
+TEXMFCNF=${srcdir}/../kpathsea
+TEXFONTS=${srcdir}/tests:${srcdir}/data
+DVIPDFMXINPUTS=${srcdir}/tests:${srcdir}/data
+TEXPICTS=${srcdir}/tests
+export TEXMFCNF TEXFONTS DVIPDFMXINPUTS TEXPICTS
+
+failed=
+
+echo "*** xdvipdfmx -v -o grahn2.pdf grahn" && echo \
+ && ./xdvipdfmx -v -o grahn2.pdf ${srcdir}/tests/grahn \
+ && echo && echo "xdvipdfmx-ann tests OK" && echo \
+ || failed="$failed xdvipdfmx-ann"
+
+test -z "$failed" && exit 0
+echo
+echo "failed tests:$failed"
+exit 1
+
diff --git a/Build/source/texk/dvipdfm-x/xdvipdfmx.test b/Build/source/texk/dvipdfm-x/xdvipdfmx.test
index 2d1fd473957..6e858aa5612 100755
--- a/Build/source/texk/dvipdfm-x/xdvipdfmx.test
+++ b/Build/source/texk/dvipdfm-x/xdvipdfmx.test
@@ -3,10 +3,8 @@
# Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
-# Not really a test, just making sure the program executes.
-
TEXMFCNF=${srcdir}/../kpathsea
-TEXFONTS=${srcdir}/data
+TEXFONTS=${srcdir}/tests:${srcdir}/data
DVIPDFMXINPUTS=${srcdir}/tests:${srcdir}/data
TEXPICTS=${srcdir}/tests
export TEXMFCNF TEXFONTS DVIPDFMXINPUTS TEXPICTS