| 1 |
# $Id: Makefile 817 2019-11-27 22:44:59Z karl $ |
| 2 |
# Public domain. |
| 3 |
# Test \pdfmajorversion and image inclusion. |
| 4 |
|
| 5 |
include ../Common.mak |
| 6 |
|
| 7 |
default: test-compress test-badver test-pdfmajor test-incl |
| 8 |
|
| 9 |
test-compress: test-compress2.tex |
| 10 |
$(prog) $< |
| 11 |
! grep "warning.*Object streams" test-compress2.log >/dev/null |
| 12 |
|
| 13 |
test-badver: test-pdfmajor.tex |
| 14 |
! $(prog) '\pdfmajorversion=0 \input $<' |
| 15 |
! $(prog) '\pdfminorversion=-1 \input $<\end' |
| 16 |
|
| 17 |
test-pdfmajor: test-pdfmajor.tex |
| 18 |
$(prog) $< |
| 19 |
# by default, first line should start with %PDF-1. |
| 20 |
sed 1q test-pdfmajor.pdf | grep "%PDF-1" >/dev/null |
| 21 |
# |
| 22 |
# go to PDF 2. |
| 23 |
$(prog) '\pdfmajorversion=2 \input $<' |
| 24 |
sed 1q test-pdfmajor.pdf | grep "%PDF-2" >/dev/null |
| 25 |
|
| 26 |
test-incl: test-incl22 test-incl21 test-incl12 |
| 27 |
# |
| 28 |
test-incl22: test-doc2incl2.tex incl2.pdf |
| 29 |
$(prog) $< # no pdftex warning |
| 30 |
! grep "at most version <" test-doc2incl2.log >/dev/null |
| 31 |
|
| 32 |
test-incl21: test-doc2incl1.tex incl1.pdf |
| 33 |
$(prog) $< # no pdftex warning |
| 34 |
! grep "at most version <" test-doc2incl1.log >/dev/null |
| 35 |
|
| 36 |
test-incl12: test-doc1incl2.tex incl2.pdf |
| 37 |
$(prog) $< # pdftex warning should be in the log |
| 38 |
grep "at most version <" test-doc1incl2.log >/dev/null |
| 39 |
# |
| 40 |
# Now let's force omission of the warning. |
| 41 |
$(prog) '\pdfinclusionerrorlevel=-1 \input $<' |
| 42 |
! grep "at most version <" test-doc1incl2.log >/dev/null |
| 43 |
|
| 44 |
incl2.pdf: incl2.tex |
| 45 |
$(prog) incl2.tex |
| 46 |
incl1.pdf: incl1.tex |
| 47 |
$(prog) incl1.tex |
| 48 |
clean: |
| 49 |
$(clean) |