| 1 |
#!/bin/sh -vx |
| 2 |
# $Id: zfmtcompress.test 69767 2024-02-10 09:42:44Z takuji $ |
| 3 |
# Public domain. Originally written by Hironori Kitagawa, 2019. |
| 4 |
# This test is intended to be used in a suitable temporary directory |
| 5 |
# after installing all engines. It should not be enabled in build stage. |
| 6 |
|
| 7 |
BinDir=${BinDir:-.} |
| 8 |
ExeExt=${ExeExt:-} |
| 9 |
|
| 10 |
cat <<'EOF' > stress.tex |
| 11 |
\let\origdump=\dump\let\dump\relax |
| 12 |
\batchmode |
| 13 |
\input plain.tex |
| 14 |
\let\dump\origdump |
| 15 |
|
| 16 |
\count0=0 |
| 17 |
\def\A{\ifnum\count0<450000 |
| 18 |
\count1=1000000 \advance\count1\count0 |
| 19 |
\edef\N{QW\the\count1} |
| 20 |
\expandafter\xdef\csname HOGE\N\endcsname{ABCDEFGHI}% |
| 21 |
\advance\count0 by1\let\next=\A\else\let\next\relax |
| 22 |
\fi\next} |
| 23 |
\A |
| 24 |
\let\N\undefined |
| 25 |
\count0=0 |
| 26 |
\def\A{\ifnum\count0<199 |
| 27 |
\count1=1000000 \advance\count1\count0 |
| 28 |
\edef\N{\the\count1} |
| 29 |
\font\S=cmr10 at \N sp\fontdimen39707\S=1sp |
| 30 |
\advance\count0 by1\let\next=\A\else\let\next\relax |
| 31 |
\fi\next} |
| 32 |
\A |
| 33 |
\dump |
| 34 |
EOF |
| 35 |
|
| 36 |
cat <<'EOF' > test0.tex |
| 37 |
\font\a=cmss10 at 1000000sp |
| 38 |
\a qwertyuiopasdfghjkl$\int^\infty_0 e^{-x^2}\,dx$\end |
| 39 |
EOF |
| 40 |
|
| 41 |
|
| 42 |
test0() { |
| 43 |
ENGINE=$1 |
| 44 |
echo $ENGINE |
| 45 |
$_engine=$BinDir/$ENGINE$ExeExt |
| 46 |
if [ ! -e $_engine ]; then return 0; fi |
| 47 |
rm -f stress-$ENGINE.fmt test0.dvi test0.xdv &>/dev/null |
| 48 |
$_engine -ini -etex -progname=$ENGINE -jobname=stress-$ENGINE stress &>/dev/null |
| 49 |
ls -l stress-$ENGINE.fmt |
| 50 |
if [[ "$ENGINE" = "xetex" ]]; then |
| 51 |
$_engine -fmt=./stress-$ENGINE.fmt -no-pdf test0.tex &>/dev/null |
| 52 |
ls -l test0.xdv |
| 53 |
else |
| 54 |
$_engine -fmt=./stress-$ENGINE.fmt test0.tex &>/dev/null |
| 55 |
ls -l test0.dvi |
| 56 |
fi |
| 57 |
} |
| 58 |
|
| 59 |
test0 tex |
| 60 |
test0 etex |
| 61 |
test0 pdftex |
| 62 |
test0 ptex |
| 63 |
test0 eptex |
| 64 |
test0 uptex |
| 65 |
test0 euptex |
| 66 |
test0 xetex |
| 67 |
|
| 68 |
cat <<'EOF' > test1.tex |
| 69 |
\documentclass{article} |
| 70 |
\begin{document} |
| 71 |
The \textit{quick} \textbf{brown} \textsc{fox} jumps over the lazy dog. |
| 72 |
\[ |
| 73 |
\frac{\pi}{2} = |
| 74 |
\left( \int_{0}^{\infty} \frac{\sin x}{\sqrt{x}} dx \right)^2 = |
| 75 |
\sum_{k=0}^{\infty} \frac{(2k)!}{2^{2k}(k!)^2} \frac{1}{2k+1} = |
| 76 |
\prod_{k=1}^{\infty} \frac{4k^2}{4k^2 - 1} |
| 77 |
\] |
| 78 |
\end{document} |
| 79 |
EOF |
| 80 |
|
| 81 |
test1() { |
| 82 |
ENGINE=$1 |
| 83 |
echo $ENGINE |
| 84 |
$_engine=$BinDir/$ENGINE$ExeExt |
| 85 |
if [ ! -e $_engine ]; then return 0; fi |
| 86 |
rm -f latex-$ENGINE.fmt test1.dvi test1.xdv &>/dev/null |
| 87 |
$_engine -ini -etex -progname=latex-dev -jobname=latex-$ENGINE latex.ini &>/dev/null |
| 88 |
ls -l latex-$ENGINE.fmt |
| 89 |
if [[ "$ENGINE" = "xetex" ]]; then |
| 90 |
$_engine -fmt=./latex-$ENGINE.fmt -no-pdf test1.tex &>/dev/null |
| 91 |
ls -l test1.xdv |
| 92 |
else |
| 93 |
$_engine -fmt=./latex-$ENGINE.fmt test1.tex &>/dev/null |
| 94 |
ls -l test1.dvi |
| 95 |
fi |
| 96 |
} |
| 97 |
|
| 98 |
test1 etex |
| 99 |
test1 pdftex |
| 100 |
test1 eptex |
| 101 |
test1 euptex |
| 102 |
test1 xetex |