diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-02 17:06:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-02 17:06:33 +0000 |
commit | d5c6ce7f09e0ed91d78f1f783ecb5e46c12abb77 (patch) | |
tree | df6bb3d9d77c17fddb5ff46f9dd873f471378a76 /Master/texmf-dist/doc/pdftex/tests | |
parent | c6061bd39c7e6eff409c3a17bc0a918f266a3bee (diff) |
pdftex doc update for TL20
git-svn-id: svn://tug.org/texlive/trunk@53997 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/tests')
23 files changed, 295 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile index 853ec0eb2ba..c0c16604bd5 100644 --- a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/Makefile @@ -1,24 +1,30 @@ -# $Id: Makefile 777 2017-04-20 23:08:32Z karl $ +# $Id: Makefile 790 2018-01-02 00:12:04Z karl $ # Public domain. include ../Common.mak default: test-pkmap -test-pkenc: # cmr10.3600pk - not used +test-pkmap: cmr10.360pk cmr10.72pk cmb10.72pk $(prog) test-pkmap.tex -# -# should work when and if patch is applied: -# grep -q /ffi test-pkenc.pdf # should end up with this encoded char -# grep -a ToUnicode test-pkenc.pdf + grep -q /ffi test-pkmap.pdf # should end up with this encoded char + grep -a ToUnicode test-pkmap.pdf # # dev convenience: # pdffonts test-big.pdf # pdftotext test-big.pdf - -cmr10.3600pk: - mf-nowin '\mode:=ljfour;mag:=6;input cmr10' - gftopk cmr10.3600gf +cmr10.360pk: + mf-nowin '\mode:=ljfour; mag:=0.6; input cmr10' + gftopk cmr10.360gf + +cmr10.72pk: + mf-nowin '\mode:=mactrue; input cmr10' + gftopk cmr10.72gf + +cmb10.72pk: + mf-nowin '\mode:=mactrue; input cmb10' + gftopk cmb10.72gf clean: $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.360pk b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.360pk Binary files differnew file mode 100644 index 00000000000..91f9dcf120f --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/cmr10.360pk diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf Binary files differindex 07617bdba2d..d7680bbec02 100644 --- a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/prepatch.pdf diff --git a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex index f78d7c095d1..66703f00990 100644 --- a/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex +++ b/Master/texmf-dist/doc/pdftex/tests/06-pkmap/test-pkmap.tex @@ -1,23 +1,25 @@ -% $Id: test-pkmap.tex 777 2017-04-20 23:08:32Z karl $ +% $Id: test-pkmap.tex 790 2018-01-02 00:12:04Z karl $ % Public domain. % Test map files with bitmap (i.e., Type 3) fonts. % A thread starting here: -% http://tug.org/pipermail/pdftex/2016-July/009064.html -% and continuing here (and more): -% http://tug.org/pipermail/pdftex/2016-August/009065.html -% discusses a patch for supporting an encoding file with Type 3. -% The patch has not yet been installed. +% https://tug.org/pipermail/pdftex/2016-July/009064.html +% and continuing on: +% https://tug.org/pipermail/pdftex/2016-August/009065.html +% https://mailman.ntg.nl/pipermail/ntg-pdftex/2017-August/004183.html +% https://mailman.ntg.nl/pipermail/ntg-pdftex/2017-December/004189.html +% discusses a patch for supporting an encoding file with Type 3 fnts. % % For comparison, the PDF made before the patch was applied is saved % here as prepatch.pdf. % -% The default PK resolution is 72, so we made cmb10.72pk in this directory. -% (mf-nowin '\mode:=mactrue; input cmb10' && gftopk cmb10.72gf) -% (mf-nowin '\mode:=mactrue; input cmr10' && gftopk cmr10.72gf) -% +% The default PK resolution is 72, so we made cmb10.72pk et al. in this +% directory; see the Makefile. + +% basic typesetting: \pdfoutput=1 \catcode`\{=1 \catcode`\}=2 \hsize=6pc \parfillskip=0pt plus1fil \vsize=6in \lineskip=1pc +\pdftrailerid{} \pdfcompresslevel=0 \pdfobjcompresslevel=0 \pdfglyphtounicode{ffi}{0066 0066 0069} %no need for all: \input glyphtounicode @@ -26,12 +28,11 @@ \pdfmapline{cmr10}% type3 map without encoding - no ToUnicode, no /ffi. \font\cmr=cmr10 \noindent \cmr ffi -% if we install the patch. -%\pdfmapline{cmb10 <7t.enc}% type3 map with encoding -%\font\cmb=cmb10 \noindent \cmb ffi +\pdfmapline{cmb10 <7t.enc}% type3 map with encoding +\font\cmb=cmb10 \noindent \cmb ffi -% geometrically-scaled tfm: the Type 3 should be scaled (resulting in -% blocky blown-up bits), instead of using a separately-generated +% scaled tfm of previously defined tfm: the Type 3 should not be +% geometrically scaled, but instead should use a separately-generated % cmr10.360pk (50*72/10). \font\big = cmr10 at 50pt \big big \end diff --git a/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/Makefile b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/Makefile new file mode 100644 index 00000000000..cb503841358 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/Makefile @@ -0,0 +1,21 @@ +# $Id: Makefile 784 2017-11-28 23:55:44Z karl $ +# Public domain. + +include ../Common.mak + +default: test-ok test-non test-post + +test-ok: + $(prog) test-pdfprimitive-ok.tex + grep ' hello ' test-pdfprimitive-ok.log >/dev/null + +test-non: + $(prog) test-pdfprimitive-non.tex + grep 'No pages of output' test-pdfprimitive-non.log >/dev/null + +test-post: + ! $(prog) test-pdfprimitive-post.tex + grep '|||' test-pdfprimitive-post.log >/dev/null + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-non.tex b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-non.tex new file mode 100644 index 00000000000..9e310bf4b33 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-non.tex @@ -0,0 +1,14 @@ +% $Id: test-pdfprimitive-non.tex 784 2017-11-28 23:55:44Z karl $ +% Public domain. + +% Check that \pdfprimitive silently gives no error when used +% on a non-primitive, or on an undefined control sequence. +% +% This is the behavior which the manual has always documented, +% although for some years up until the 2018 release, pdftex +% gave an error instead of making it be a no-op. +% +\let\mytestcs=\relax +\pdfprimitive\mytestcs +\pdfprimitive\undefinedjunky +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-ok.tex b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-ok.tex new file mode 100644 index 00000000000..f02d096db12 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-ok.tex @@ -0,0 +1,9 @@ +% $Id: test-pdfprimitive-ok.tex 784 2017-11-28 23:55:44Z karl $ +% Public domain. + +\catcode`\{=1 \catcode`\}=2 + +% Check that \pdfprimitive works at all. +\let\message=\relax +\pdfprimitive\message{hello}% +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-post.tex b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-post.tex new file mode 100644 index 00000000000..9e27f2954f8 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/08-pdfprimitive/test-pdfprimitive-post.tex @@ -0,0 +1,9 @@ +% $Id: test-pdfprimitive-post.tex 784 2017-11-28 23:55:44Z karl $ +% Public domain. + +% Check that \pdfprimitive does not swallow following (possibly +% undefined) control sequences. So this should output three \vrules and +% give an undefined error: +\pdfprimitive\vrule\vrule +\pdfprimitive\vrule\undefinedjunky +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/Makefile b/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/Makefile new file mode 100644 index 00000000000..706c721bcae --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/Makefile @@ -0,0 +1,13 @@ +# $Id: Makefile 793 2018-01-25 23:21:29Z karl $ +# Public domain. + +include ../Common.mak + +default: test-ok + +test-ok: + $(prog) test-fontobjnum.tex + grep 'fontobjnum=1' test-fontobjnum.log >/dev/null + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/test-fontobjnum.tex b/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/test-fontobjnum.tex new file mode 100644 index 00000000000..ba5c5ef7354 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/09-fontobjnum/test-fontobjnum.tex @@ -0,0 +1,9 @@ +% $Id: test-fontobjnum.tex 793 2018-01-25 23:21:29Z karl $ +% Public domain. + +\catcode`\{=1 \catcode`\}=2 +\font\tenit = /usr/local/texlive/2017/texmf-dist/fonts/tfm/public/cm/cmti10.tfm +\edef\tenitnumber{\pdffontobjnum\tenit} +\message{fontobjnum=\tenitnumber} +\tenitnumber +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/10-moddate/Makefile b/Master/texmf-dist/doc/pdftex/tests/10-moddate/Makefile new file mode 100644 index 00000000000..8f32955d46e --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/10-moddate/Makefile @@ -0,0 +1,27 @@ +# $Id: Makefile 808 2018-11-13 18:39:00Z karl $ +# Public domain. + +include ../Common.mak + +default: test-moddate test-moddate-abs + +test-moddate: + # regular + $(prog) test-moddate.tex + grep "D:2[0-9].*-.*'" test-moddate.log >/dev/null + # + # just one envvar, still regular. + SOURCE_DATE_EPOCH=1 $(prog) test-moddate.tex + grep "D:2[0-9].*-.*'" test-moddate.log >/dev/null + # + # both envvars, force utc. + FORCE_SOURCE_DATE=1 SOURCE_DATE_EPOCH=1 $(prog) test-moddate.tex + grep "D:2[0-9].*Z " test-moddate.log >/dev/null + +test-moddate-abs: + # should fail due to openin_any. + openin_any=p $(prog) test-moddate-abs.tex + ! grep "D:2[0-9]" test-moddate-abs.log >/dev/null + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate-abs.tex b/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate-abs.tex new file mode 100644 index 00000000000..1ddde5267e0 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate-abs.tex @@ -0,0 +1,9 @@ +% $Id: test-moddate-abs.tex 808 2018-11-13 18:39:00Z karl $ +% Public domain. + +\catcode`\{=1 \catcode`\}=2 + +% Check that \pdffilemoddate fails on system filenames +% with openin_any=p; see Makefile. +\message{\pdffilemoddate{/etc/issue}} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate.tex b/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate.tex new file mode 100644 index 00000000000..c55759006bf --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/10-moddate/test-moddate.tex @@ -0,0 +1,8 @@ +% $Id: test-moddate.tex 808 2018-11-13 18:39:00Z karl $ +% Public domain. + +\catcode`\{=1 \catcode`\}=2 + +% Check that \pdffilemoddate returns UTC with envvars set; see Makefile. +\message{\pdffilemoddate{\jobname.tex}} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/Makefile b/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/Makefile new file mode 100644 index 00000000000..a8add649020 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/Makefile @@ -0,0 +1,18 @@ +# $Id: Makefile 813 2019-01-28 00:04:18Z karl $ +# Public domain. + +include ../Common.mak + +default: test-omitcharset + +test-omitcharset: + # by default, CharSet is included. + $(prog) test-omitcharset.tex + grep "/CharSet" test-omitcharset.pdf >/dev/null + # + # force CharSet to be omitted. + $(prog) '\pdfomitcharset=1 \input test-omitcharset.tex' + ! grep "/CharSet" test-omitcharset.pdf >/dev/null + +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/test-omitcharset.tex b/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/test-omitcharset.tex new file mode 100644 index 00000000000..b1b0a58fd03 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/11-omitcharset/test-omitcharset.tex @@ -0,0 +1,10 @@ +% $Id: test-omitcharset.tex 813 2019-01-28 00:04:18Z karl $ +% Public domain. +\input plain.tex +\input pdftexconfig.tex +\input pdftexmagfix.tex +\pdfcompresslevel=0 % get greppable output +\pdfobjcompresslevel=0 + +abc +\bye diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile new file mode 100644 index 00000000000..46525f91ecf --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile @@ -0,0 +1,49 @@ +# $Id: Makefile 817 2019-11-27 22:44:59Z karl $ +# Public domain. +# Test \pdfmajorversion and image inclusion. + +include ../Common.mak + +default: test-compress test-badver test-pdfmajor test-incl + +test-compress: test-compress2.tex + $(prog) $< + ! grep "warning.*Object streams" test-compress2.log >/dev/null + +test-badver: test-pdfmajor.tex + ! $(prog) '\pdfmajorversion=0 \input $<' + ! $(prog) '\pdfminorversion=-1 \input $<\end' + +test-pdfmajor: test-pdfmajor.tex + $(prog) $< + # by default, first line should start with %PDF-1. + sed 1q test-pdfmajor.pdf | grep "%PDF-1" >/dev/null + # + # go to PDF 2. + $(prog) '\pdfmajorversion=2 \input $<' + sed 1q test-pdfmajor.pdf | grep "%PDF-2" >/dev/null + +test-incl: test-incl22 test-incl21 test-incl12 +# +test-incl22: test-doc2incl2.tex incl2.pdf + $(prog) $< # no pdftex warning + ! grep "at most version <" test-doc2incl2.log >/dev/null + +test-incl21: test-doc2incl1.tex incl1.pdf + $(prog) $< # no pdftex warning + ! grep "at most version <" test-doc2incl1.log >/dev/null + +test-incl12: test-doc1incl2.tex incl2.pdf + $(prog) $< # pdftex warning should be in the log + grep "at most version <" test-doc1incl2.log >/dev/null + # + # Now let's force omission of the warning. + $(prog) '\pdfinclusionerrorlevel=-1 \input $<' + ! grep "at most version <" test-doc1incl2.log >/dev/null + +incl2.pdf: incl2.tex + $(prog) incl2.tex +incl1.pdf: incl1.tex + $(prog) incl1.tex +clean: + $(clean) diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex new file mode 100644 index 00000000000..b3adc3e5da1 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex @@ -0,0 +1,7 @@ +% $Id: incl1.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% Trivial PDF-1 file, with default pdf version. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\hrule width1pt height1pt depth0pt +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex new file mode 100644 index 00000000000..5937a218e2a --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex @@ -0,0 +1,13 @@ +% $Id: incl2.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% Trivial PDF-2 file. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 + +% let's make a 2.0 document, since that is what is needed in practice. +% The default would be 2.4, since \pdfminorversion is 4 (from 1.4). +\pdfmajorversion=2 \pdfminorversion=0 + +% typeset something. +\hrule width1pt height1pt depth0pt +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex new file mode 100644 index 00000000000..00c528caedb --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex @@ -0,0 +1,12 @@ +% $Id: test-compress2.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% Check that PDF 2.0 allows object compression. +% +% We should also check \pdfimagehicolor, but since its setting and +% resetting depending on version is silent, too painful. +% +\pdfoutput=1 +\pdfmajorversion=2 \pdfminorversion=0 +\pdfobjcompresslevel=2 +\hrule width1pt height1pt depth0pt +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex new file mode 100644 index 00000000000..4fd77c5c97f --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex @@ -0,0 +1,9 @@ +% $Id: test-doc1incl2.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% PDF1 document, include PDF2 image. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\catcode`\{=1 \catcode`\}=2 +\pdfximage{incl2.pdf} +\hbox{\pdfrefximage\pdflastximage} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex new file mode 100644 index 00000000000..c674ca37337 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex @@ -0,0 +1,10 @@ +% $Id: test-doc2incl1.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% PDF2 document, include PDF1 image. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\pdfmajorversion=2 \pdfminorversion=0 +\catcode`\{=1 \catcode`\}=2 +\pdfximage{incl1.pdf} +\hbox{\pdfrefximage\pdflastximage} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex new file mode 100644 index 00000000000..ca2bb58b29b --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex @@ -0,0 +1,10 @@ +% $Id: test-doc2incl2.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% PDF2 document, include PDF2 image. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\pdfmajorversion=2 \pdfminorversion=0 +\catcode`\{=1 \catcode`\}=2 +\pdfximage{incl2.pdf} +\hbox{\pdfrefximage\pdflastximage} +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex new file mode 100644 index 00000000000..797a0e00c71 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex @@ -0,0 +1,7 @@ +% $Id: test-pdfmajor.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% Leave \pdfmajorversion unset, so it can be set on the command line. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\hrule width1pt height1pt depth0pt +\end |