summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dviout-util/ChangeLog11
-rw-r--r--Build/source/texk/dviout-util/Makefile.am18
-rw-r--r--Build/source/texk/dviout-util/Makefile.in20
-rwxr-xr-xBuild/source/texk/dviout-util/chkdvifont.test10
-rw-r--r--Build/source/texk/dviout-util/dvispc.c36
-rwxr-xr-xBuild/source/texk/dviout-util/dvispc.test97
-rw-r--r--Build/source/texk/dviout-util/tests/annot.dvibin0 -> 1336 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/annot.tex12
-rw-r--r--Build/source/texk/dviout-util/tests/flatnest.dvibin0 -> 1824 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/flatnest.tex30
-rw-r--r--Build/source/texk/dviout-util/tests/longspec.dvibin1372 -> 1052 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/longspec.tex6
-rw-r--r--Build/source/texk/dviout-util/tests/longspecout.dvibin1668 -> 0 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/oldindep.cfn19
-rw-r--r--Build/source/texk/dviout-util/tests/oldindep.spc25
-rw-r--r--Build/source/texk/dviout-util/tests/oldindep.tex1
-rw-r--r--Build/source/texk/dviout-util/tests/reverse.dvibin0 -> 2244 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/reverse.tex31
-rw-r--r--Build/source/texk/dviout-util/tests/reverseout.dvibin0 -> 2484 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/test.cfn26
-rw-r--r--Build/source/texk/dviout-util/tests/test.dvibin4412 -> 0 bytes
-rw-r--r--Build/source/texk/dviout-util/tests/test.spc99
-rw-r--r--Build/source/texk/dviout-util/tests/test.tex37
-rw-r--r--Build/source/texk/dviout-util/tests/testout.dvibin4840 -> 0 bytes
24 files changed, 231 insertions, 247 deletions
diff --git a/Build/source/texk/dviout-util/ChangeLog b/Build/source/texk/dviout-util/ChangeLog
index 9b6d1456091..78ad897718e 100644
--- a/Build/source/texk/dviout-util/ChangeLog
+++ b/Build/source/texk/dviout-util/ChangeLog
@@ -1,3 +1,12 @@
+2018-10-13 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * dvispc.c: Stop support for pdf:bann, pe:eann which was
+ not working properly.
+ * chkdvifont.test, dvispc.test: Reconstruct tests.
+ * tests/annot.{tex,dvi}, tests/longspec.{tex,dvi},
+ tests/flatnest.{tex,dvi}: Prepared for future work.
+ * Makefile.am: Adjusted.
+
2018-10-12 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
* dvispc.c: Append .dvi suffix for DVI output.
@@ -9,7 +18,7 @@
* dvispc.c: Support page-independence even with long
specials. Use MAX_... constants for error messages.
* dvispc.test: Test long specials.
- * tests/longspec.{tex,dvi}, tests/longspecout.dvi: New tests.
+ * tests/longspec.{tex,dvi}: New tests.
* Makefile.am: Adjusted.
2018-10-10 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
diff --git a/Build/source/texk/dviout-util/Makefile.am b/Build/source/texk/dviout-util/Makefile.am
index 13e5905ffbf..590e6a19eef 100644
--- a/Build/source/texk/dviout-util/Makefile.am
+++ b/Build/source/texk/dviout-util/Makefile.am
@@ -30,22 +30,24 @@ chkdvifont.log: chkdvifont$(EXEEXT)
EXTRA_DIST = $(TESTS)
## dvispc.test
-EXTRA_DIST += tests/test.spc \
- tests/test.tex tests/test.dvi tests/testout.dvi \
+EXTRA_DIST += tests/oldindep.spc \
tests/oldindep.tex tests/oldindep.dvi tests/oldindepout.dvi \
- tests/longspec.tex tests/longspec.dvi tests/longspecout.dvi
-DISTCLEANFILES = x*test.spc \
- x*testa.txt x*testax.dvi \
- x*testout.dvi x*oldindepout.dvi x*longspecout.dvi \
+ tests/reverse.tex tests/reverse.dvi tests/reverseout.dvi \
+ tests/annot.tex tests/annot.dvi \
+ tests/longspec.tex tests/longspec.dvi \
+ tests/flatnest.tex tests/flatnest.dvi
+DISTCLEANFILES = x*oldindep.spc \
+ x*oldindepa.txt x*oldindepax.dvi x*oldindepout.dvi \
+ x*reverseout.dvi \
x*write.dvi x*writeout.dvi
## chkdvifont.test
-EXTRA_DIST += tests/test.cfn \
+EXTRA_DIST += tests/oldindep.cfn \
tests/jis.tfm tests/jis.cfn \
tests/eufm10.tfm tests/eufm10.cfn \
tests/cmr10.pk tests/cmr10.cfn \
tests/upjisr-h.vf tests/upsjir-h.cfn
-DISTCLEANFILES += test.dvi xtest.cfn \
+DISTCLEANFILES += oldindep.dvi xoldindep.cfn \
xjis.cfn xeufm10.cfn xeufm10.ed.cfn \
xcmr10.cfn xupjisr-h.cfn
diff --git a/Build/source/texk/dviout-util/Makefile.in b/Build/source/texk/dviout-util/Makefile.in
index 196dabc8bf8..25ba6730748 100644
--- a/Build/source/texk/dviout-util/Makefile.in
+++ b/Build/source/texk/dviout-util/Makefile.in
@@ -559,15 +559,17 @@ LDADD = $(KPATHSEA_LIBS)
dvispc_LDADD = $(PTEXENC_LIBS) $(LDADD)
dist_man1_MANS = dvispc.man chkdvifont.man
TESTS = dvispc.test chkdvifont.test
-EXTRA_DIST = $(TESTS) tests/test.spc tests/test.tex tests/test.dvi \
- tests/testout.dvi tests/oldindep.tex tests/oldindep.dvi \
- tests/oldindepout.dvi tests/longspec.tex tests/longspec.dvi \
- tests/longspecout.dvi tests/test.cfn tests/jis.tfm \
- tests/jis.cfn tests/eufm10.tfm tests/eufm10.cfn tests/cmr10.pk \
- tests/cmr10.cfn tests/upjisr-h.vf tests/upsjir-h.cfn
-DISTCLEANFILES = x*test.spc x*testa.txt x*testax.dvi x*testout.dvi \
- x*oldindepout.dvi x*longspecout.dvi x*write.dvi x*writeout.dvi \
- test.dvi xtest.cfn xjis.cfn xeufm10.cfn xeufm10.ed.cfn \
+EXTRA_DIST = $(TESTS) tests/oldindep.spc tests/oldindep.tex \
+ tests/oldindep.dvi tests/oldindepout.dvi tests/reverse.tex \
+ tests/reverse.dvi tests/reverseout.dvi tests/annot.tex \
+ tests/annot.dvi tests/longspec.tex tests/longspec.dvi \
+ tests/flatnest.tex tests/flatnest.dvi tests/oldindep.cfn \
+ tests/jis.tfm tests/jis.cfn tests/eufm10.tfm tests/eufm10.cfn \
+ tests/cmr10.pk tests/cmr10.cfn tests/upjisr-h.vf \
+ tests/upsjir-h.cfn
+DISTCLEANFILES = x*oldindep.spc x*oldindepa.txt x*oldindepax.dvi \
+ x*oldindepout.dvi x*reverseout.dvi x*write.dvi x*writeout.dvi \
+ oldindep.dvi xoldindep.cfn xjis.cfn xeufm10.cfn xeufm10.ed.cfn \
xcmr10.cfn xupjisr-h.cfn
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/Build/source/texk/dviout-util/chkdvifont.test b/Build/source/texk/dviout-util/chkdvifont.test
index 366f4614f54..0aca12ee579 100755
--- a/Build/source/texk/dviout-util/chkdvifont.test
+++ b/Build/source/texk/dviout-util/chkdvifont.test
@@ -10,15 +10,15 @@ testdir=$srcdir/tests
# 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/test.spc $testdir/test.spc \
+diff --strip-trailing-cr $testdir/oldindep.cfn $testdir/oldindep.cfn \
&& diffoptCRLF=--strip-trailing-cr || echo
## DVI mode
-cp $testdir/test.dvi . && \
- ./chkdvifont -c ./test.dvi > xtest.cfn && \
- diff $diffoptCRLF $testdir/test.cfn xtest.cfn && echo || exit 1
+cp $testdir/oldindep.dvi . && \
+ ./chkdvifont -c ./oldindep.dvi > xoldindep.cfn && \
+ diff $diffoptCRLF $testdir/oldindep.cfn xoldindep.cfn && echo || exit 1
## TFM/JFM mode
@@ -32,6 +32,7 @@ cp $testdir/test.dvi . && \
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 && \
@@ -46,5 +47,6 @@ echo M | ./chkdvifont && echo || exit 0
./chkdvifont -c $testdir/upjisr-h.vf > xupjisr-h.cfn && \
diff $diffoptCRLF $testdir/upjisr-h.cfn xupjisr-h.cfn && echo || exit 5
+
exit 0
diff --git a/Build/source/texk/dviout-util/dvispc.c b/Build/source/texk/dviout-util/dvispc.c
index 67e08a71517..1f4face7df3 100644
--- a/Build/source/texk/dviout-util/dvispc.c
+++ b/Build/source/texk/dviout-util/dvispc.c
@@ -963,11 +963,11 @@ lastpage: if(isdigit(*++out_pages)){
write_sp(fp, pdf_bgcolor);
f_needs_corr++;
}
- while(pdf_annot_under > 0){ /* recover underflow of pdf:bann ... pdf:eann stack */
- /* [TODO] what should we do here? */
- f_needs_corr++;
- pdf_annot_under--;
- }
+// while(pdf_annot_under > 0){ /* recover underflow of pdf:bann ... pdf:eann stack */
+// /* [TODO] what should we do here? */
+// f_needs_corr++;
+// pdf_annot_under--;
+// }
/* [Process 3] write contents of the current page */
fseek(dvi->file_ptr, dim->page_index[page]+45, SEEK_SET);
@@ -984,10 +984,10 @@ lastpage: if(isdigit(*++out_pages)){
write_sp(fp, "pdf:ecolor");
f_needs_corr++;
}
- for(count = 0; count < pdf_annot_depth; count++){
- write_sp(fp, "pdf:eann");
- f_needs_corr++;
- }
+// for(count = 0; count < pdf_annot_depth; count++){
+// write_sp(fp, "pdf:eann");
+// f_needs_corr++;
+// }
write_byte((uchar)EOP, fp); /* write EOP */
former = current;
current = ftell(fp); /* get position of BOP/POST */
@@ -1003,15 +1003,15 @@ lastpage: if(isdigit(*++out_pages)){
write_sp(fp, color_pt[count]);
for(count = 0; count < pdf_color_depth; count++)
write_sp(fp, pdf_color_pt[count]);
- for(count = 0; count < pdf_annot_depth; count++)
- write_sp(fp, pdf_annot_pt[count]);
+// for(count = 0; count < pdf_annot_depth; count++)
+// write_sp(fp, pdf_annot_pt[count]);
if(tpic_pn[0]) {
write_sp(fp, tpic_pn);
f_needs_corr++;
}
f_needs_corr += color_depth;
f_needs_corr += pdf_color_depth;
- f_needs_corr += pdf_annot_depth;
+// f_needs_corr += pdf_annot_depth;
if(tpic_pn[0])
f_needs_corr++;
}
@@ -1345,11 +1345,11 @@ skip: while (tmp--)
strncpy(pdf_bgcolor, special, MAX_LEN);
f_pdf_bgcolor = 1;
}
- else if(!strsubcmp_n(special, "pdf:bann")) /* pdf:bann */
- sp_pdf_bann(special);
- else if(!strsubcmp(special, "pdf:eann")) /* pdf:eann */
- sp_pdf_eann(special);
- break;
+// else if(!strsubcmp_n(special, "pdf:bann")) /* pdf:bann */
+// sp_pdf_bann(special);
+// else if(!strsubcmp(special, "pdf:eann")) /* pdf:eann */
+// sp_pdf_eann(special);
+ break;
}
goto skip;
}
@@ -1472,7 +1472,7 @@ void sp_pdf_eann(char *sp)
if(--pdf_annot_depth < 0){
fprintf(stderr, "pdf:bann ... pdf:eann stack underflow\n");
pdf_annot_under++;
- f_needs_corr++;
+// f_needs_corr++;
pdf_annot_depth = 0;
}
return;
diff --git a/Build/source/texk/dviout-util/dvispc.test b/Build/source/texk/dviout-util/dvispc.test
index f477921e759..4cc0c60dcce 100755
--- a/Build/source/texk/dviout-util/dvispc.test
+++ b/Build/source/texk/dviout-util/dvispc.test
@@ -10,43 +10,43 @@ testdir=$srcdir/tests
# 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/test.spc $testdir/test.spc \
+diff --strip-trailing-cr $testdir/oldindep.spc $testdir/oldindep.spc \
&& diffoptCRLF=--strip-trailing-cr || echo
## EXE2SPECIAL
-./dvispc -s $testdir/test.dvi xtest.spc && \
- diff $diffoptCRLF $testdir/test.spc xtest.spc && echo || exit 1
+./dvispc -s $testdir/oldindep.dvi xoldindep.spc && \
+ diff $diffoptCRLF $testdir/oldindep.spc xoldindep.spc && echo || exit 1
-./dvispc -s $testdir/test.dvi > x1test.spc && \
- diff $diffoptCRLF $testdir/test.spc x1test.spc && echo || exit 2
+./dvispc -s $testdir/oldindep.dvi > x1oldindep.spc && \
+ diff $diffoptCRLF $testdir/oldindep.spc x1oldindep.spc && echo || exit 2
## invalid usage
-#./dvispc -s < $testdir/test.dvi x2test.spc && \
-# diff $testdir/test.spc x2test.spc && echo || exit 0
+#./dvispc -s < $testdir/oldindep.dvi x2oldindep.spc && \
+# diff $testdir/oldindep.spc x2oldindep.spc && echo || exit 0
## stdin is a DVI, random access may not be supported, no test
-#./dvispc -s < $testdir/test.dvi > x3test.spc && \
-# diff $testdir/test.spc x3test.spc && echo || exit 3
+#./dvispc -s < $testdir/oldindep.dvi > x3oldindep.spc && \
+# diff $testdir/oldindep.spc x3oldindep.spc && echo || exit 3
## EXE2TEXT + EXE2DVI
-./dvispc -a $testdir/test.dvi xtesta.txt && \
- ./dvispc -x xtesta.txt xtestax.dvi && \
- cmp $testdir/test.dvi xtestax.dvi && echo || exit 4
+./dvispc -a $testdir/oldindep.dvi xoldindepa.txt && \
+ ./dvispc -x xoldindepa.txt xoldindepax.dvi && \
+ cmp $testdir/oldindep.dvi xoldindepax.dvi && echo || exit 4
-./dvispc -a $testdir/test.dvi > x1testa.txt && \
- ./dvispc -x < x1testa.txt > x1testax.dvi && \
- cmp $testdir/test.dvi x1testax.dvi && echo || exit 5
+./dvispc -a $testdir/oldindep.dvi > x1oldindepa.txt && \
+ ./dvispc -x < x1oldindepa.txt > x1oldindepax.dvi && \
+ cmp $testdir/oldindep.dvi x1oldindepax.dvi && echo || exit 5
# not working as expected only for test (redirect??)
-#./dvispc -a $testdir/test.dvi | ./dvispc -x x2testax.dvi && \
-# cmp $testdir/test.dvi x2testax.dvi && echo || exit 6
+#./dvispc -a $testdir/oldindep.dvi | ./dvispc -x x2oldindepax.dvi && \
+# cmp $testdir/oldindep.dvi x2oldindepax.dvi && echo || exit 6
-./dvispc -a $testdir/test.dvi | ./dvispc -x > x3testax.dvi && \
- cmp $testdir/test.dvi x3testax.dvi && echo || exit 7
+./dvispc -a $testdir/oldindep.dvi | ./dvispc -x > x3oldindepax.dvi && \
+ cmp $testdir/oldindep.dvi x3oldindepax.dvi && echo || exit 7
## EXE2INDEP
@@ -57,54 +57,65 @@ diff --strip-trailing-cr $testdir/test.spc $testdir/test.spc \
./dvispc -c $testdir/oldindep.dvi > x1oldindepout.dvi && \
cmp $testdir/oldindepout.dvi x1oldindepout.dvi && echo || exit 2
+## check default is -c
+./dvispc $testdir/oldindep.dvi x1oldindepout.dvi && \
+ cmp $testdir/oldindepout.dvi x1oldindepout.dvi && echo || exit 3
+
## check default overwrite
# not working as expected only for test (redirect??)
#cp $testdir/oldindep.dvi x3write.dvi && \
# ./dvispc x3write.dvi
-# cmp $testdir/oldindepout.dvi x3write.dvi && echo || exit 3
+# cmp $testdir/oldindepout.dvi x3write.dvi && echo || exit 4
./dvispc && echo || exit 0
-# the following tests include
-# * correction of dvipdfmx-style specials
-# * correction of long (>255) specials
-# * correction in reversed order which requires prior scanning
-# so will not pass for old version written by SHIMA.
+# the following tests will not pass for old version written by SHIMA.
# that version can be distinguished from the new version by
# exit code 1 for usage without argument. (the above line did it!)
-./dvispc -c $testdir/test.dvi xtestout.dvi && \
- cmp $testdir/testout.dvi xtestout.dvi && echo || exit 4
+## page independence in reversed order which requires prior scanning
+./dvispc -c $testdir/reverse.dvi xreverseout.dvi && \
+ cmp $testdir/reverseout.dvi xreverseout.dvi && echo || exit 5
-./dvispc -c $testdir/test.dvi > x1testout.dvi && \
- cmp $testdir/testout.dvi x1testout.dvi && echo || exit 5
+./dvispc -c $testdir/reverse.dvi > x1reverseout.dvi && \
+ cmp $testdir/reverseout.dvi x1reverseout.dvi && echo || exit 6
## invalid usage
-#./dvispc -c < $testdir/test.dvi x2testout.dvi && \
-# cmp $testdir/testout.dvi x2testout.dvi && echo || exit 0
+#./dvispc -c < $testdir/reverse.dvi x2reverseout.dvi && \
+# cmp $testdir/reverseout.dvi x2reverseout.dvi && echo || exit 0
## stdin is a DVI, random access may not be supported, no test
-#./dvispc -c < $testdir/test.dvi > x3testout.dvi && \
-# cmp $testdir/testout.dvi x3testout.dvi && echo || exit 6
+#./dvispc -c < $testdir/reverse.dvi > x3reverseout.dvi && \
+# cmp $testdir/reverseout.dvi x3reverseout.dvi && echo || exit 7
-./dvispc -c $testdir/longspec.dvi xlongspecout.dvi && \
- cmp $testdir/longspecout.dvi xlongspecout.dvi && echo || exit 7
+# ==== future work start ====
-## check default is -c
-./dvispc $testdir/longspec.dvi x1longspecout.dvi && \
- cmp $testdir/longspecout.dvi x1longspecout.dvi && echo || exit 8
+## page independence of annotation
+#./dvispc $testdir/annot.dvi xannotout.dvi && \
+# cmp $testdir/annotout.dvi xannotout.dvi && echo || exit 1
+
+## page independence of long (>255) specials (e.g. annotation)
+## disabled because annotation is unsupported
+#./dvispc $testdir/longspec.dvi xlongspecout.dvi && \
+# cmp $testdir/longspecout.dvi xlongspecout.dvi && echo || exit 2
+
+## flatten nested anotation
+#./dvispc $testdir/flatnest.dvi xflatnestout.dvi && \
+# cmp $testdir/flatnestout.dvi xflatnestout.dvi && echo || exit 3
+
+# ==== future work end ====
-## check -b backup works (old version did not work)
+## check -b backup works (old version did not!)
# not working as expected only for test (redirect??)
#cp $testdir/oldindep.dvi x4write.dvi && \
# ./dvispc -b x4write.dvi
-# cmp $testdir/oldindepout.dvi x4write.dvi && echo || exit 9
-# cmp $testdir/oldindep.dvi x4write.dvi.bak && echo || exit 9
+# cmp $testdir/oldindepout.dvi x4write.dvi && echo || exit 1
+# cmp $testdir/oldindep.dvi x4write.dvi.bak && echo || exit 1
-## without .dvi extension (old version missed for outfile)
+## without .dvi extension (old version missed for outfile!)
cp $testdir/oldindep.dvi x5write.dvi && \
./dvispc x5write x5writeout
- cmp $testdir/oldindepout.dvi x5writeout.dvi && echo || exit 10
+ cmp $testdir/oldindepout.dvi x5writeout.dvi && echo || exit 2
exit 0
diff --git a/Build/source/texk/dviout-util/tests/annot.dvi b/Build/source/texk/dviout-util/tests/annot.dvi
new file mode 100644
index 00000000000..19e83bf960b
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/annot.dvi
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/annot.tex b/Build/source/texk/dviout-util/tests/annot.tex
new file mode 100644
index 00000000000..523bb297ee1
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/annot.tex
@@ -0,0 +1,12 @@
+% page independence of annotation
+\documentclass[a4paper,dvipdfmx]{article}
+\usepackage[colorlinks=true]{hyperref}
+\textheight3cm
+\begin{document}
+Here starts hyperlink:
+\href{https://ctan.org/}{CTAN} ended.
+\href{https://tug.org/}%
+{TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG
+ TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG}
+Again starts hyperlink: \href{https://ctan.org/}{CTAN} all done!
+\end{document}
diff --git a/Build/source/texk/dviout-util/tests/flatnest.dvi b/Build/source/texk/dviout-util/tests/flatnest.dvi
new file mode 100644
index 00000000000..3fe2b1a3766
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/flatnest.dvi
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/flatnest.tex b/Build/source/texk/dviout-util/tests/flatnest.tex
new file mode 100644
index 00000000000..7d42b38aaca
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/flatnest.tex
@@ -0,0 +1,30 @@
+% flatten nested annotation
+\documentclass[dvipdfmx]{article}
+\usepackage[colorlinks=true]{hyperref}
+\textwidth5cm
+\makeatletter
+\usepackage{etoolbox}
+\patchcmd{\@makecol}{%
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+}{%
+ \color@begingroup
+ \normalcolor
+ \special{pdf:nolink}%
+ \footnoterule
+ \unvbox \footins
+ \special{pdf:link}%
+ \color@endgroup
+}{}{}
+\makeatother
+
+\begin{document}
+A\footnote{CTAN web: \href{https://ctan.org/}{CTAN} here!}
+\vspace*{41\baselineskip}
+
+Text with link: \href{https://tug.org/}{TUG TUG TUG TUG
+TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG} all done!
+\end{document}
diff --git a/Build/source/texk/dviout-util/tests/longspec.dvi b/Build/source/texk/dviout-util/tests/longspec.dvi
index 0515d1ffee6..64f249853df 100644
--- a/Build/source/texk/dviout-util/tests/longspec.dvi
+++ b/Build/source/texk/dviout-util/tests/longspec.dvi
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/longspec.tex b/Build/source/texk/dviout-util/tests/longspec.tex
index d7b72b59d18..11ac9a24d17 100644
--- a/Build/source/texk/dviout-util/tests/longspec.tex
+++ b/Build/source/texk/dviout-util/tests/longspec.tex
@@ -1,9 +1,11 @@
+% page independence of long special (annotation)
\documentclass[dvipdfmx]{article}
\usepackage{hyperref}
\begin{document}
+B\par
\noindent
% length of special: 282 (0x0000011A)
\href{https://www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/datavisualization/tikzlibrarydatavisualization.formats.functions.code.tex?revision=20236&view=markup}{%
-A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\%
-A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A}
+A\\[42\baselineskip]A\\%
+A\\[20\baselineskip]A\\A\\A\\A\\A}
\end{document}
diff --git a/Build/source/texk/dviout-util/tests/longspecout.dvi b/Build/source/texk/dviout-util/tests/longspecout.dvi
deleted file mode 100644
index 55833fd03be..00000000000
--- a/Build/source/texk/dviout-util/tests/longspecout.dvi
+++ /dev/null
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/oldindep.cfn b/Build/source/texk/dviout-util/tests/oldindep.cfn
new file mode 100644
index 00000000000..70a16c48fb3
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/oldindep.cfn
@@ -0,0 +1,19 @@
+dvi file name = ./oldindep.dvi
+comment = TeX output 2018.10.08:1213
+factor converting to 10^{-5}m = 25400000/473628672
+magnification = 1000
+maximum width = 26673152 scaled points = 407 points
+maximum height+depth = 41484288 scaled points = 633 points
+maximum stack depth = 3
+number of pages = 4
+page size = 14.3 cm x 22.2 cm
+page size magnificated = 14.3 cm x 22.2 cm
+
+Font 7
+ checksum = 4BF16079
+ design size = 655360 scaled points = 10 points
+ space size = 655360 scaled points = 10 points
+ font name = cmr10
+
+EXIT Code (errorlevel) = 0
+No AMS Font
diff --git a/Build/source/texk/dviout-util/tests/oldindep.spc b/Build/source/texk/dviout-util/tests/oldindep.spc
new file mode 100644
index 00000000000..8d288dccf55
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/oldindep.spc
@@ -0,0 +1,25 @@
+[1]
+{papersize=614.295pt,794.96999pt}
+{color push Black}
+{color pop}
+{background rgb 1 0 0}
+{color push Black}
+{color pop}
+[2]
+{color push Black}
+{color pop}
+{color push rgb 0 0 1}
+{color push Black}
+{color pop}
+[3]
+{color push Black}
+{color pop}
+{background gray 1}
+{color pop}
+{color push Black}
+{color pop}
+[4]
+{color push Black}
+{color pop}
+{color push Black}
+{color pop}
diff --git a/Build/source/texk/dviout-util/tests/oldindep.tex b/Build/source/texk/dviout-util/tests/oldindep.tex
index 333709dbbe3..cdfbb4269d9 100644
--- a/Build/source/texk/dviout-util/tests/oldindep.tex
+++ b/Build/source/texk/dviout-util/tests/oldindep.tex
@@ -1,3 +1,4 @@
+% page independence (backward compatible)
\documentclass{article}
\usepackage[dvips]{color}
\begin{document}
diff --git a/Build/source/texk/dviout-util/tests/reverse.dvi b/Build/source/texk/dviout-util/tests/reverse.dvi
new file mode 100644
index 00000000000..61fdeadc31c
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/reverse.dvi
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/reverse.tex b/Build/source/texk/dviout-util/tests/reverse.tex
new file mode 100644
index 00000000000..4099689d12d
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/reverse.tex
@@ -0,0 +1,31 @@
+% page independence in reverse order too
+\documentclass{article}
+\usepackage[dvips]{color}
+\textheight3cm
+\begin{document}
+\Huge
+white
+\newpage
+white
+\newpage
+\pagecolor{red}
+red
+\newpage
+red
+\newpage
+red
+\newpage
+\pagecolor{white}
+white
+\newpage
+black
+\newpage
+{\color{red}
+red
+\newpage
+red
+\newpage
+red}
+\newpage
+black
+\end{document}
diff --git a/Build/source/texk/dviout-util/tests/reverseout.dvi b/Build/source/texk/dviout-util/tests/reverseout.dvi
new file mode 100644
index 00000000000..ba2aa1796d7
--- /dev/null
+++ b/Build/source/texk/dviout-util/tests/reverseout.dvi
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/test.cfn b/Build/source/texk/dviout-util/tests/test.cfn
deleted file mode 100644
index 6c0a411a9f1..00000000000
--- a/Build/source/texk/dviout-util/tests/test.cfn
+++ /dev/null
@@ -1,26 +0,0 @@
-dvi file name = ./test.dvi
-comment = TeX output 2018.02.11:1459
-factor converting to 10^{-5}m = 25400000/473628672
-magnification = 1000
-maximum width = 26083328 scaled points = 398 points
-maximum height+depth = 11099063 scaled points = 169 points
-maximum stack depth = 4
-number of pages = 13
-page size = 14.0 cm x 6.0 cm
-page size magnificated = 14.0 cm x 6.0 cm
-
-Font 14
- checksum = 44D3ED74
- design size = 1132462 scaled points = 17 points
- space size = 1630536 scaled points = 24 points
- magnification = +magstep2
- font name = cmr17
-
-Font 7
- checksum = 4BF16079
- design size = 655360 scaled points = 10 points
- space size = 655360 scaled points = 10 points
- font name = cmr10
-
-EXIT Code (errorlevel) = 0
-No AMS Font
diff --git a/Build/source/texk/dviout-util/tests/test.dvi b/Build/source/texk/dviout-util/tests/test.dvi
deleted file mode 100644
index 808b8371748..00000000000
--- a/Build/source/texk/dviout-util/tests/test.dvi
+++ /dev/null
Binary files differ
diff --git a/Build/source/texk/dviout-util/tests/test.spc b/Build/source/texk/dviout-util/tests/test.spc
deleted file mode 100644
index db4301f32f7..00000000000
--- a/Build/source/texk/dviout-util/tests/test.spc
+++ /dev/null
@@ -1,99 +0,0 @@
-[1]
-{pdf:docinfo<</Title()/Subject()/Creator(LaTeX with hyperref package)/Author()/Producer(dvipdfm)/Keywords()>>}
-{papersize=597.50787pt,845.04684pt}
-{pdf:dest (page.1) [@thispage /XYZ @xpos @ypos null]}
-{pdf:pagesize width 597.50787pt height 845.04684pt}
-{color push Black}
-{color pop}
-{pdf:docview<</OpenAction[@page1/Fit]/PageMode/UseOutlines>>}
-{pdf:dest (Doc-Start) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-[2]
-{pdf:dest (page.2) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[3]
-{pdf:dest (page.3) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{background rgb 1 0 0}
-{color push Black}
-{color pop}
-[4]
-{pdf:dest (page.4) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[5]
-{pdf:dest (page.5) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[6]
-{pdf:dest (page.6) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{background gray 1}
-{color push Black}
-{color pop}
-[7]
-{pdf:dest (page.7) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[8]
-{pdf:dest (page.8) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push rgb 1 0 0}
-{color push Black}
-{color pop}
-[9]
-{pdf:dest (page.9) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[10]
-{pdf:dest (page.10) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color pop}
-{color push Black}
-{color pop}
-[11]
-{pdf:dest (page.11) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color push Black}
-{color pop}
-[12]
-{pdf:dest (page.12) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{pdf:bann<</Type/Annot/Subtype/Link/Border[0 0 0]/H/I/C[0 1 1]/A<</S/URI/URI(https://ctan.org/)>>>>}
-{color push cmyk 0 1 0 0}
-{color pop}
-{pdf:eann}
-{pdf:bann<</Type/Annot/Subtype/Link/Border[0 0 0]/H/I/C[0 1 1]/A<</S/URI/URI(https://tug.org/)>>>>}
-{color push cmyk 0 1 0 0}
-{color push Black}
-{color pop}
-[13]
-{pdf:dest (page.13) [@thispage /XYZ @xpos @ypos null]}
-{color push Black}
-{color pop}
-{color pop}
-{pdf:eann}
-{pdf:bann<</Type/Annot/Subtype/Link/Border[0 0 0]/H/I/C[0 1 1]/A<</S/URI/URI(https://ctan.org/)>>>>}
-{color push cmyk 0 1 0 0}
-{color pop}
-{pdf:eann}
-{color push Black}
-{color pop}
diff --git a/Build/source/texk/dviout-util/tests/test.tex b/Build/source/texk/dviout-util/tests/test.tex
deleted file mode 100644
index 9986af8d058..00000000000
--- a/Build/source/texk/dviout-util/tests/test.tex
+++ /dev/null
@@ -1,37 +0,0 @@
-\documentclass[a4paper,dvipdfmx]{article}
-\usepackage{color}
-\usepackage[colorlinks=true]{hyperref}
-\textheight3cm
-\begin{document}
-\Huge
-white
-\newpage
-white
-\newpage
-\pagecolor{red}
-red
-\newpage
-red
-\newpage
-red
-\newpage
-\pagecolor{white}
-white
-\newpage
-black
-\newpage
-{\color{red}
-red
-\newpage
-red
-\newpage
-red}
-\newpage
-black
-\newpage
-Here starts hyperlink:
-\href{https://ctan.org/}{CTAN} ended.
-\href{https://tug.org/}%
-{TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG TUG}
-Again starts hyperlink: \href{https://ctan.org/}{CTAN} all done!
-\end{document}
diff --git a/Build/source/texk/dviout-util/tests/testout.dvi b/Build/source/texk/dviout-util/tests/testout.dvi
deleted file mode 100644
index 39fc947cc6e..00000000000
--- a/Build/source/texk/dviout-util/tests/testout.dvi
+++ /dev/null
Binary files differ