Debian Codegraph @

texk/dvipdfm-x/xdvipdfm-pdf.test

raw
1 #! /bin/sh -vx
2 # $Id: xdvipdfm-pdf.test 74908 2025-04-10 22:20:35Z karl $
3 # Copyright 2025 Karl Berry <[email protected]>
4 # You may freely use, modify and/or distribute this file.
5 # PDF parsing reports.
6
7 BinDir=${BinDir:-.}
8 ExeExt=${ExeExt:-}
9 _xdvipdfmx=$BinDir/xdvipdfmx$ExeExt
10
11 TEXMFCNF=$srcdir/../kpathsea
12 TFMFONTS="$srcdir/tests;$srcdir/data"
13 T1FONTS="$srcdir/tests;$srcdir/data"
14 TEXFONTMAPS="$srcdir/tests;$srcdir/data"
15 DVIPDFMXINPUTS="$srcdir/tests;$srcdir/data"
16 TEXPICTS=$srcdir/tests
17 export TEXMFCNF TFMFONTS T1FONTS TEXFONTMAPS DVIPDFMXINPUTS TEXPICTS
18
19 failed=
20
21 # xdvipdfm-pdfobj: Object stream parsing bug. Original report from
22 # Shuqiao Zhang,
23 # https://tug.org/pipermail/tex-live/2025-April/051444.html
24 # Unfortunately the bug is not reliably reproducible, as Zhang explains
25 # in https://tug.org/pipermail/tex-live/2025-April/051447.html.
26
27 # xdvipdfm-pdfgroup: Page group bug. Report and fix from Clerk Ma,
28 # ca. 19 Mar 2025.
29
30 for testfile in xdvipdfm-pdfobj.xdv xdvipdfm-pdfgroup.dvi; do
31 testin=$srcdir/tests/$testfile
32 testout=$testfile.pdf
33 #
34 # The pdfobj.xdv test includes a .pdf file, referenced as ./ in the
35 # .xdv, so have to copy it into the working directory.
36 cp $srcdir/tests/rpki-ecosystem.drawio.pdf . || exit 1
37 #
38 # By the way, the pdfgroup.dvi test includes the file
39 # xdvipdfm-pdfgroup-0318.pdf, but since that reference doesn't use
40 # "./", it can be found in srcdir/tests via TEXPICTS above.
41 #
42 cmd="$_xdvipdfmx $testin -o $testout"
43 echo "*** $cmd"
44 if $cmd && test -s $testout; then
45 echo "$testfile test OK"
46 else
47 failed="$failed $testfile"
48 fi
49 done
50
51 test -z "$failed" && exit 0
52 echo
53 echo "failed tests:$failed"
54 exit 1