summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/pdftex/tests
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-25 20:46:03 +0000
committerKarl Berry <karl@freefriends.org>2016-04-25 20:46:03 +0000
commitcfa0d42c795abf70a671d0a381e4fb45a3dba13d (patch)
treecbae7a39b41eb1daaae2950a2c214c31ab35ad47 /Master/texmf-dist/doc/pdftex/tests
parent5e37eaa6f3ee9d0cecc7e29e73baf8f5380d6ba4 (diff)
pdftex doc for TL16: updates to manual, more tests, samplepdf(tex) at top level, pdfkeys and thanh/ext removed
git-svn-id: svn://tug.org/texlive/trunk@40740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/tests')
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile5
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.pfbbin0 -> 2409 bytes
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.tfmbin0 -> 152 bytes
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/fake-interword-space.tex34
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile43
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-SOURCE_DATE_EPOCH.tex10
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-fixed-date-id.tex16
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-no-date-id.tex13
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile40
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/abc.tex10
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfinfoomitdate.tex4
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfsuppressptexinfo.tex18
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdftrailer.tex6
-rw-r--r--Master/texmf-dist/doc/pdftex/tests/Common.mak28
14 files changed, 227 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile
new file mode 100644
index 00000000000..1af4806137c
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/Makefile
@@ -0,0 +1,5 @@
+test:
+ ../../source/build-pdftex/texk/web2c/pdftex -ini fake-interword-space.tex
+
+clean:
+ rm -f fake-interword-space.log fake-interword-space.pdf
diff --git a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.pfb b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.pfb
new file mode 100644
index 00000000000..46390162be3
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.pfb
Binary files differ
diff --git a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.tfm b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.tfm
new file mode 100644
index 00000000000..fc0719e1a57
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/dummy-space.tfm
Binary files differ
diff --git a/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/fake-interword-space.tex b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/fake-interword-space.tex
new file mode 100644
index 00000000000..09d7bff39f4
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/01-fake-interword-space/fake-interword-space.tex
@@ -0,0 +1,34 @@
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+
+\pdfmapline{+dummy-space <dummy-space.pfb}
+\pdfglyphtounicode{space}{0020}
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+Text with no interword spaces.
+
+\pdfinterwordspaceon
+
+Switch to text with faked interword spaces.
+
+\pdfinterwordspaceoff
+
+Back to text with no interword \pdffakespace spaces.
+
+% Test of \pdffakespace in vertical mode
+\pdffakespace
+
+% Test of \pdffakespace in math mode
+$a\pdffakespace b$
+
+Back to text with no interword \pdffakespace\pdffakespace spaces.
+
+% Test of \pdffakespace in vertical mode
+\pdffakespace
+\pdffakespace
+
+% Test of \pdffakespace in math mode
+$a\pdffakespace \pdffakespace b$
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
new file mode 100644
index 00000000000..cbf7ee13b25
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/Makefile
@@ -0,0 +1,43 @@
+# $Id: Makefile 740 2016-04-23 15:08:37Z karl $
+# Public domain.
+
+include ../Common.mak
+
+test1:
+ $(prog) test-no-date-id.tex
+
+test2:
+ $(prog) test-fixed-date-id.tex
+
+test = test-SOURCE_DATE_EPOCH
+# test invalid settings of the envvar.
+test3-invalid:
+ -SOURCE_DATE_EPOCH=" " $(prog) $(test).tex
+ -SOURCE_DATE_EPOCH=abc123 $(prog) $(test).tex
+ -SOURCE_DATE_EPOCH=0.0 $(prog) $(test).tex
+ -SOURCE_DATE_EPOCH=-1 $(prog) $(test).tex
+ -SOURCE_DATE_EPOCH=123abc $(prog) $(test).tex
+ -SOURCE_DATE_EPOCH=994399281551439928155 $(prog) $(test).tex
+
+test3-orig.pdf:
+ $(prog) $(test).tex && mv $(test).pdf $@
+
+# test valid settings of the envvar.
+test3-valid: test3-orig.pdf test3-repro.pdf
+ SOURCE_DATE_EPOCH=0 $(prog) $(test).tex
+ SOURCE_DATE_EPOCH="" $(prog) $(test).tex # same as 0
+ -$(diff) $< $(test).pdf # shows differences
+ SOURCE_DATE_EPOCH=10 $(prog) $(test).tex
+ $(diff) test3-repro.pdf $(test).pdf # should be identical
+# SOURCE_DATE_EPOCH=1439928155 $(prog) $(test).tex
+
+# make an original with nonzero time for checking.
+test3-repro.pdf:
+ SOURCE_DATE_EPOCH=10 $(prog) $(test).tex && mv $(test).pdf $@
+
+clean:
+ rm -f *.log *.pdf *.fmt *.aux
+
+fmt:
+ $(prog) *pdflatex.ini
+ $(prog) *pdfetex.ini
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-SOURCE_DATE_EPOCH.tex b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-SOURCE_DATE_EPOCH.tex
new file mode 100644
index 00000000000..bc037ea01ce
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-SOURCE_DATE_EPOCH.tex
@@ -0,0 +1,10 @@
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+abc
+\eject
+def
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-fixed-date-id.tex b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-fixed-date-id.tex
new file mode 100644
index 00000000000..933ed1b5f59
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-fixed-date-id.tex
@@ -0,0 +1,16 @@
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+\pdfinfo{%
+ /ModDate (D:20150813230402+02'00')
+ /CreationDate (D:20150813230402+02'00')
+}
+\pdftrailerid{test-fixed-date-id.tex:20150813230402+02'00'}
+
+abc
+\eject
+def
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-no-date-id.tex b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-no-date-id.tex
new file mode 100644
index 00000000000..c8ebf176f4f
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/03-deterministic-output/test-no-date-id.tex
@@ -0,0 +1,13 @@
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+\pdfinfoomitdate=1
+\pdftrailerid{}
+
+abc
+\eject
+def
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile
new file mode 100644
index 00000000000..6e176ae9742
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/Makefile
@@ -0,0 +1,40 @@
+# $Id: Makefile 740 2016-04-23 15:08:37Z karl $
+# Public domain.
+
+include ../Common.mak
+
+all: abc-diff testptex-diff testdate-diff testtrailer-diff
+
+abc abc.pdf:
+ $(env) $(prog) '\pdfsuppressptexinfo=1\input' abc.tex </dev/null
+
+abc-orig.pdf:
+ $(env) $(prog) abc.tex </dev/null && mv abc.pdf $@
+abc-diff: abc-orig.pdf abc.pdf
+ -$(diff) $^ # /PTEX.Fullbanner should be gone
+
+testptex = test-pdfsuppressptexinfo
+$(testptex)-orig.pdf: $(testptex).tex abc.pdf
+ $(env) $(prog) $(testptex).tex </dev/null \
+ && mv $(testptex).pdf $(testptex)-orig.pdf
+$(testptex).pdf: $(testptex).tex abc.pdf Makefile
+ $(env) $(prog) '\pdfsuppressptexinfo=-1\input' $(testptex).tex \
+ </dev/null
+testptex-diff: $(testptex)-orig.pdf $(testptex).pdf
+ -$(diff) $^ # all /PTEX.* should be gone
+
+# these are also tested in ../03-deterministic-output, but can try them here.
+testdate = test-pdfinfoomitdate
+$(testdate).pdf: $(testdate).tex abc.pdf
+ $(env) $(prog) $(testdate).tex </dev/null
+testdate-diff: $(testptex)-orig.pdf $(testdate).pdf
+ -$(diff) $^ # /CreationDate, /ModDate should be gone
+
+testtrailer = test-pdftrailer
+$(testtrailer).pdf: $(testtrailer).tex abc.pdf
+ $(env) $(prog) $(testtrailer).tex </dev/null
+testtrailer-diff: $(testptex)-orig.pdf $(testtrailer).pdf
+ -$(diff) $^ # new /mytrlrkey, dates+id should be different
+
+clean:
+ rm -f *.log *.pdf *.fmt *.aux
diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/abc.tex b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/abc.tex
new file mode 100644
index 00000000000..045ccbcd2f8
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/abc.tex
@@ -0,0 +1,10 @@
+% $Id: abc.tex 737 2016-03-21 22:54:16Z karl $
+% Public domain.
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+abc
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfinfoomitdate.tex b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfinfoomitdate.tex
new file mode 100644
index 00000000000..dfd30ceb996
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfinfoomitdate.tex
@@ -0,0 +1,4 @@
+% $Id: test-pdfinfoomitdate.tex 737 2016-03-21 22:54:16Z karl $
+% Public domain.
+\pdfinfoomitdate = 1
+\input test-pdfsuppressptexinfo
diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfsuppressptexinfo.tex b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfsuppressptexinfo.tex
new file mode 100644
index 00000000000..fac5e30b807
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdfsuppressptexinfo.tex
@@ -0,0 +1,18 @@
+% $Id: test-pdfsuppressptexinfo.tex 740 2016-04-23 15:08:37Z karl $
+% Public domain.
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+% \pdfsuppressptexinfo=-1
+% \pdfsuppressptexinfo=15
+% \pdfsuppressptexinfo=8
+% \pdfsuppressptexinfo=4
+% \pdfsuppressptexinfo=2
+% \pdfsuppressptexinfo=1
+
+\pdfximage{abc.pdf}
+\hbox{\pdfrefximage\pdflastximage}
+\bye
diff --git a/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdftrailer.tex b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdftrailer.tex
new file mode 100644
index 00000000000..119292229aa
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/04-pdfsuppressptexinfo/test-pdftrailer.tex
@@ -0,0 +1,6 @@
+% $Id: test-pdftrailer.tex 737 2016-03-21 22:54:16Z karl $
+% Public domain.
+\pdfoutput=1 \catcode`\{=1 \catcode`\}=2
+\pdftrailer {/mytrlrkey /mytrlrval}
+\pdftrailerid {} % seed for trailer id
+\input test-pdfsuppressptexinfo
diff --git a/Master/texmf-dist/doc/pdftex/tests/Common.mak b/Master/texmf-dist/doc/pdftex/tests/Common.mak
new file mode 100644
index 00000000000..201bef42e9d
--- /dev/null
+++ b/Master/texmf-dist/doc/pdftex/tests/Common.mak
@@ -0,0 +1,28 @@
+# $Id: Common.mak 737 2016-03-21 22:54:16Z karl $
+# Public domain.
+
+# Common Makefile definitions to run pdftex from test hierarchy,
+# but use support files from an installation.
+
+tl = /usr/local/texmf
+tl_dist = $(tl)/texmf-dist
+#
+plain = $(tl_dist)/tex/plain/base
+plain_config = $(tl_dist)/tex/plain/config
+generic_config = $(tl)/texmf-config/tex/generic/config
+generic_hyphen = $(tl_dist)/tex/generic/hyphen
+#
+tfm_cm = $(tl_dist)/fonts/tfm/public/cm
+tfm_knuth = $(tl_dist)/fonts/tfm/public/knuth-lib
+t1_cm = $(tl_dist)/fonts/type1/public/amsfonts/cm
+#
+env = TEXINPUTS=.:$(plain):$(plain_config):$(generic_config):$(generic_hyphen)\
+ TEXFONTS=$(tfm_cm):$(tfm_knuth):$(t1_cm) \
+ TEXFONTMAPS=$(tl_dist)/fonts/map/pdftex/updmap \
+ MKTEXTFM=0 \
+ KPATHSEA_WARNING=0
+
+diff = diff --text -c0
+
+pdftex = ../../source/build-pdftex/texk/web2c/pdftex
+prog = $(env) $(pdftex) -ini -interaction=nonstopmode