summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-02 21:08:17 +0000
committerKarl Berry <karl@freefriends.org>2019-11-02 21:08:17 +0000
commit2ba06c139c46208f03d24e06963bbdc3db72f4b1 (patch)
tree226b9bbb1b659584610711ded374c8e519cda6b4 /Master/texmf-dist
parent75cbcb5f3f8393acfde0998a271ca7b887c2e6c4 (diff)
l3build (2nov19)
git-svn-id: svn://tug.org/texlive/trunk@52619 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/l3build/CHANGELOG.md21
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin705508 -> 704268 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.12
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.man1.pdfbin15106 -> 15105 bytes
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-check.lua27
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua10
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx176
-rw-r--r--Master/texmf-dist/tex/latex/l3build/regression-test.tex115
9 files changed, 259 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
index ec89a3f58ae..b74e6286872 100644
--- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
@@ -7,6 +7,24 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2019-11-01]
+
+### Added
+
+- New `\ASSERT` and `\ASSERTSTR` functions (issue #102)
+
+### Changed
+
+- Avoid normalisation of (u)pTeX data when this is standard engine
+ (fixes #103)
+- Normalise Lua data references (#107)
+- Extend `runtest_task()` to pass run number
+- Allow `regression-test` to load when e-TeX is unavailable (fixes #105)
+
+### Fixed
+
+- Location of `testsuppdir` when multiple configurations are used
+
## [2019-10-02]
### Added
@@ -370,7 +388,8 @@ this project uses date-based 'snapshot' version identifiers.
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX3 kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2019-10-02...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2019-11-01...HEAD
+[2019-11-01]: https://github.com/latex3/l3build/compare/2019-10-02...2019-11-01
[2019-10-02]: https://github.com/latex3/l3build/compare/2019-09-30...2019-10-02
[2019-09-30]: https://github.com/latex3/l3build/compare/2019-09-29...2019-09-30
[2019-09-29]: https://github.com/latex3/l3build/compare/2019-09-28...2019-09-29
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index 04fb613e321..d781a521d02 100644
--- a/Master/texmf-dist/doc/latex/l3build/README.md
+++ b/Master/texmf-dist/doc/latex/l3build/README.md
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2019-10-02
+Release 2019-11-01
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index 8a7d3fc1de3..27c6e3c9186 100644
--- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf
+++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1
index 91374cd0fab..aa583fe5994 100644
--- a/Master/texmf-dist/doc/man/man1/l3build.1
+++ b/Master/texmf-dist/doc/man/man1/l3build.1
@@ -1,4 +1,4 @@
-.TH l3build 1 "2019-10-02"
+.TH l3build 1 "2019-11-01"
.SH NAME
l3build \- Checking and building packages
.SH SYNOPSIS
diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
index 5971c1d08d3..fabbe845e7b 100644
--- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua
index e2cdd655bf8..ea550327eb1 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-check.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua
@@ -215,12 +215,14 @@ local function normalize_log(content,engine,errlevels)
if match(line, "^> \\box%d+=$") or match(line, "^> \\box%d+=(void)$") then
line = gsub(line, "%d+=", "...=")
end
- -- Remove 'normal' direction information on boxes with (u)pTeX
- line = gsub(line, ",? yoko direction,?", "")
- line = gsub(line, ",? yoko%(math%) direction,?", "")
- -- Remove '\displace 0.0' lines in (u)pTeX
- if match(line,"^%.*\\displace 0%.0$") then
- return ""
+ if not match(stdengine,"^e?u?ptex$") then
+ -- Remove 'normal' direction information on boxes with (u)pTeX
+ line = gsub(line, ",? yoko direction,?", "")
+ line = gsub(line, ",? yoko%(math%) direction,?", "")
+ -- Remove '\displace 0.0' lines in (u)pTeX
+ if match(line,"^%.*\\displace 0%.0$") then
+ return ""
+ end
end
-- Remove the \special line that in DVI mode keeps PDFs comparable
if match(line, "^%.*\\special%{pdf: docinfo << /Creator") then
@@ -249,6 +251,9 @@ local function normalize_log(content,engine,errlevels)
line = gsub(line, "save cache:", "load cache:")
-- A tidy-up to keep LuaTeX and other engines in sync
line = gsub(line, utf8_char(127), "^^?")
+ -- Remove lua data reference ids
+ line = gsub(line, "<lua data reference [0-9]+>",
+ "<lua data reference ...>")
-- Unicode engines display chars in the upper half of the 8-bit range:
-- tidy up to match pdfTeX if an ASCII engine is in use
if next(asciiengines) then
@@ -749,7 +754,7 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
.. setup(lvtfile)
.. (hide and (" > " .. os_null) or "")
.. os_concat ..
- runtest_tasks(jobname(lvtfile))
+ runtest_tasks(jobname(lvtfile),i)
)
-- Break the loop if the result is stable
if breakout and i < checkruns then
@@ -796,7 +801,7 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
end
-- A hook to allow additional tasks to run for the tests
-runtest_tasks = runtest_tasks or function(name)
+runtest_tasks = runtest_tasks or function(name,run)
return ""
end
@@ -958,6 +963,10 @@ end
function save(names)
checkinit()
local engines = options["engine"] or {stdengine}
+ if names == nil then
+ print("Arguments are required for the save command")
+ return 1
+ end
for _,name in pairs(names) do
if testexists(name) then
for _,engine in pairs(engines) do
@@ -989,7 +998,7 @@ function save(names)
.. lveext .. " file of the same name")
return 1
else
- print('Test "'.. name .. '"not found')
+ print('Test "' .. name .. '" not found')
return 1
end
end
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index d9f4fe23f8e..48f3ab99d4f 100755
--- a/Master/texmf-dist/scripts/l3build/l3build.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build.lua
@@ -2,7 +2,7 @@
--[[
-File l3build.lua Copyright (C) 2014-2018 The LaTeX3 Project
+File l3build.lua Copyright (C) 2014-2019 The LaTeX3 Project
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -25,7 +25,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2019-10-02"
+release_date = "2019-11-01"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -177,8 +177,14 @@ if #checkconfigs == 1 and
(options["target"] == "check" or options["target"] == "save" or options["target"] == "clean") then
local config = "./" .. gsub(checkconfigs[1],".lua$","") .. ".lua"
if fileexists(config) then
+ local savedtestfiledir = testfiledir
dofile(config)
testdir = testdir .. "-" .. checkconfigs[1]
+ -- Reset testsuppdir if required
+ if savedtestfiledir ~= testfiledir and
+ testsuppdir == savedtestfiledir .. "/support" then
+ testsuppdir = testfiledir .. "/support"
+ end
else
print("Error: Cannot find configuration " .. checkconfigs[1])
exit(1)
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index e48fd8b1956..2f55c5173da 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -231,7 +231,7 @@
% }^^A
% }
%
-% \date{Released 2019-10-02}
+% \date{Released 2019-11-01}
%
% \maketitle
% \tableofcontents
@@ -845,6 +845,9 @@
% \texttt{\cs{\meta{type}}\meta{...}}
% \item Conversion of box numbers in |\show| lines
% \texttt{>~\cs{box}\meta{number}=} to \texttt{>~\cs{box}...=}
+% \item Conversion of Lua data reference ids
+% \texttt{<lua data reference \meta{number}>} to
+% \texttt{<lua data reference ...>}
% \item Removal of some (u)p\TeX{} data where it is equivalent to
% \pdfTeX{} (|yoko direction|, |\displace 0.0|)
% \end{itemize}
@@ -893,16 +896,6 @@
%
% Any commands that write content to the |.log| file that should be ignored can be surrounded by |\OMIT| \dots\ |\TIMO|.
% At the appropriate location in the document where the |.log| comparisons should start (say, after |\begin{document}|), the test suite must contain the |\START| macro.
-% The test should then include \cs{AUTHOR}\marg{authors details} in case a test file fails in the future and needs to be re-analysed.
-%
-% Some additional diagnostic information can then be included as metadata for the conditions of the test.
-% The desired format can be indicated with \cs{FORMAT}\marg{format name}, and any packages or classes loaded can be indicated with
-%
-% \noindent\hspace*{2\parindent} \cs{CLASS}\oarg{options}\marg{class name, version}\par
-% \noindent\hspace*{2\parindent} \cs{PACKAGE}\oarg{options}\marg{package name, version}
-%
-% \noindent These do not provide information that is useful for automated checking; after all, packages change their version numbers frequently.
-% Rather, including this information in a test indicates the conditions under which the test was definitely known to pass at a certain time in the past.
%
% The |\END| command signals the end of the test (but read on).
% Some additional diagnostic information is printed at this time to debug if the test did not complete `properly' in terms of mismatched brace groups or \cs{if}\dots\cs{fi} groups.
@@ -913,9 +906,6 @@
%
% \subsection{Commands to help write tests}
%
-% A simple command \cs{CHECKCOMMAND}\cs{\meta{macro}} is provided to check whether a particular \cs{\meta{macro}} is defined, undefined, or equivalent to \cs{relax}.
-% This is useful to flag either that internal macros are remaining local to their definitions, or that defined commands definitely are defined, or even as a reminder that commands you intend to define in a future package need to be tested once they appear.
-%
% \cs{TYPE} is used to write material to the \texttt{.log} file, like \LaTeX's \cs{typeout}, but it allows `long' input.
% The following commands are defined to use \cs{TYPE} to output strings to the \texttt{.log} file.
% \begin{itemize}
@@ -936,6 +926,13 @@
% \item
% \cs{BEGINTEST}\marg{title} \dots \cs{ENDTEST} is an environment form of
% \cs{TEST}, allowing verbatim material, \emph{etc.} to appear.
+% \item
+% \cs{SHOWFILE} (\eTeX{} only) Shows the content of the file given as an
+% argument.
+% \item
+% \cs{ASSERT} and \cs{ASSERTSTR} (\eTeX{} only) Asserts if the full expansion
+% of the two required arguments are the same: the \cs{ASSERT} function is
+% token-based, the \cs{ASSERTSTR} works on a string basis.
% \end{itemize}
% An example of some of these commands is shown following.
% \begin{Verbatim}
@@ -1105,19 +1102,23 @@
% or more engines, but will not carry out any additional processing. For
% some tests, for example bibliography generation, it may be desirable to
% call one or more tools in addition to the engine. This can be arranged
-% by defining |runtest_tasks|, a function taking one argument, the name
+% by defining |runtest_tasks|, a function taking two arguments, the name
% of the current test (this is equivalent to \TeX{}'s \cs{jobname},
-% \emph{i.e.}~it lacks an extension). The function |runtest_tasks|
-% is is into a call to the system to run the engine. As such, it
-% should take return a string with the appropriate command(s)
-% and option(s). If more than one task is required, these should be separated
+% \emph{i.e.}~it lacks an extension) and the current run number.
+% The function |runtest_tasks| is run after the main call to the
+% engine for a test cycle. It should return an errorlevel value.
+% If more than one task is required, these should be separated
% by use of |os_concat|, a string variable defined by \pkg{l3build} as the
% correct concatenation marker for the system. An example of |runtest_tasks|
% suitable for calling Biber is shown in Listing~\ref{fig:test-tasks}.
% \begin{figure}
% \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
-% function runtest_tasks(name)
-% return "biber " .. name
+% function runtest_tasks(name,run)
+% if run == 1 then
+% return "biber " .. name
+% else
+% return 0
+% end
% end
% \end{lstlisting}
% \caption{Example \texttt{runtest_tasks} function.}
@@ -2028,12 +2029,11 @@
%
% \subsection{Preliminaries}
%
-% We require \eTeX{}.
+% We require \eTeX{} for some features.
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname eTeXversion\endcsname\relax
- \errmessage{e-TeX is required to use regression-test.tex}%
- \expandafter\endinput
+ \message{e-TeX is required by some regression-test.tex features}%
\fi
% \end{macrocode}
%
@@ -2058,7 +2058,11 @@
% Put \TeX{} into scroll mode, and stop it showing the
% implementation details of macros in error messages.
% \begin{macrocode}
-\ifnum\interactionmode>1 \scrollmode\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname interactionmode\endcsname\relax
+\else
+ \ifnum\interactionmode>1 \scrollmode\fi
+\fi
\errorcontextlines=-1 %
% \end{macrocode}
%
@@ -2140,6 +2144,13 @@
\LONGTYPEOUT{^^JEND-TEST-LOG^^J}%
\@@@end
}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname currentgrouplevel\endcsname\relax
+ \def\END{%
+ \LONGTYPEOUT{^^JEND-TEST-LOG^^J}%
+ \@@@end
+ }
+\fi
\ifx\@@end\@undefined
\let\end\END
\else
@@ -2157,8 +2168,6 @@
% \end{macrocode}
% \end{macro}
%
-%
-
% \begin{macro}{\SHOWFILE}
% Load a file (e.g.,| \jobname.toc|) into the .log file with the usual special
% characters rendered harmless. Use as |\SHOWFILE{\jobname.aux}|.
@@ -2180,6 +2189,10 @@
\typeout{-------- #1 (end) -----------}%
}%
\endgroup
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname everyeof\endcsname\relax
+ \def\SHOWFILE#1{\TYPE{FEATURE UNAVAILABLE}}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -2224,7 +2237,9 @@
% \FALSE,
% \YES,
% \NO,
-% \NEWLINE
+% \NEWLINE,
+% \ASSERT,
+% \ASSERTSTR
% }
% We are not starved for space in the log file output, so let's make it as
% verbose as is useful when reading the |.diff|'s.
@@ -2234,7 +2249,7 @@
============================================================%
}%
}
-\protected\long\def\BEGINTEST#1{%
+\csname protected\endcsname\long\def\BEGINTEST#1{%
\global\advance\gTESTint by 1 %
\SEPARATOR
\LONGTYPEOUT{TEST \the\gTESTint: \detokenize{#1}}%
@@ -2242,7 +2257,21 @@
\begingroup
\let\TYPE\LONGTYPEOUT
}
-\protected\long\def\ENDTEST{%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname detokenize\endcsname\relax
+ \long\def\BEGINTEST#1{%
+ \global\advance\gTESTint by 1 %
+ \SEPARATOR
+ \begingroup
+ \toks0={#1}%
+ \LONGTYPEOUT{TEST \the\gTESTint: \the\toks0 }%
+ \endgroup
+ \SEPARATOR
+ \begingroup
+ \let\TYPE\LONGTYPEOUT
+ }
+\fi
+\csname protected\endcsname\long\def\ENDTEST{%
\endgroup
\SEPARATOR
\LONGTYPEOUT{}%
@@ -2262,11 +2291,74 @@
\def \YES {\TYPE{YES}}
\def \NO {\TYPE{NO}}
\def \NEWLINE {\TYPE{^^J}}
+\csname protected\endcsname\long\def\ASSERT#1#2{%
+ \begingroup
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \ifx\@tempa\@tempb
+ \TYPE{PASSED}%
+ \else
+ \TYPE{FAILED}%
+ \fi
+ \endgroup
+}
+\csname protected\endcsname\long\def\ASSERTSTR#1#2{%
+ \begingroup
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \edef\@tempa{\detokenize\expandafter{\@tempa}}%
+ \edef\@tempb{\detokenize\expandafter{\@tempb}}%
+ \ifx\@tempa\@tempb
+ \TYPE{PASSED}%
+ \else
+ \TYPE{FAILED}%
+ \fi
+ \endgroup
+}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname detokenize\endcsname\relax
+ \long\def\ASSERTSTR#1#2{%
+ \TYPE{FEATURE UNAVAILABLE}%
+ }
+\fi
% \end{macrocode}
% \end{macro}
%
% \subsection{Suppressing variable data in output}
%
+% Disable compression in PDF output.
+% \begin{macrocode}
+\ifnum 0%
+ \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
+ \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
+ >0 %
+ \ifx\pdfvariable\@undefined
+ \pdfcompresslevel=0 %
+ \pdfobjcompresslevel=0 %
+ \else
+ \pdfvariable compresslevel=0 %
+ \pdfvariable objcompresslevel=0 %
+ \fi
+\else
+ \ifnum 0%
+ \ifx\XeTeXversion\@undefined\else 1\fi
+ \ifx\kanjiskip\@undefined\else 1\fi
+ >0 %
+ \special{dvipdfmx:config z 0}% Compress level
+ \special{dvipdfmx:config C 0x40}% Object compression
+ \fi
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \reset@catcodes
+ \let\protected\undefined
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
% Load the map file early so it does not appear in the log.
% \begin{macrocode}
\ifx\pdfoutput\@undefined
@@ -2335,30 +2427,6 @@
\fi
% \end{macrocode}
%
-% Disable compression in PDF output.
-% \begin{macrocode}
-\ifnum 0%
- \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
- \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
- >0 %
- \ifx\pdfvariable\@undefined
- \pdfcompresslevel=0 %
- \pdfobjcompresslevel=0 %
- \else
- \pdfvariable compresslevel=0 %
- \pdfvariable objcompresslevel=0 %
- \fi
-\else
- \ifnum 0%
- \ifx\XeTeXversion\@undefined\else 1\fi
- \ifx\kanjiskip\@undefined\else 1\fi
- >0 %
- \special{dvipdfmx:config z 0}% Compress level
- \special{dvipdfmx:config C 0x40}% Object compression
- \fi
-\fi
-% \end{macrocode}
-%
% Finish up.
% \begin{macrocode}
\reset@catcodes
diff --git a/Master/texmf-dist/tex/latex/l3build/regression-test.tex b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
index 22d2f0a2c0a..fc77a4da7df 100644
--- a/Master/texmf-dist/tex/latex/l3build/regression-test.tex
+++ b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
@@ -20,8 +20,7 @@
%%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname eTeXversion\endcsname\relax
- \errmessage{e-TeX is required to use regression-test.tex}%
- \expandafter\endinput
+ \message{e-TeX is required by some regression-test.tex features}%
\fi
\ifx\unprotect\undefined
\expandafter\edef\csname reset\string @catcodes\endcsname{%
@@ -32,7 +31,11 @@
\unprotect
\def\reset@catcodes{\protect}%
\fi
-\ifnum\interactionmode>1 \scrollmode\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname interactionmode\endcsname\relax
+\else
+ \ifnum\interactionmode>1 \scrollmode\fi
+\fi
\errorcontextlines=-1 %
\showboxbreadth=\maxdimen
\showboxdepth=\maxdimen
@@ -73,6 +76,13 @@
\LONGTYPEOUT{^^JEND-TEST-LOG^^J}%
\@@@end
}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname currentgrouplevel\endcsname\relax
+ \def\END{%
+ \LONGTYPEOUT{^^JEND-TEST-LOG^^J}%
+ \@@@end
+ }
+\fi
\ifx\@@end\@undefined
\let\end\END
\else
@@ -80,7 +90,6 @@
\fi
\def\OMIT{\LONGTYPEOUT{OMIT}}
\def\TIMO{\LONGTYPEOUT{TIMO}}
-
\begingroup % within the scope of this groups each line needs to end in % !
\catcode`\^^M\active %
\gdef\SHOWFILE#1{%
@@ -98,6 +107,10 @@
\typeout{-------- #1 (end) -----------}%
}%
\endgroup
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname everyeof\endcsname\relax
+ \def\SHOWFILE#1{\TYPE{FEATURE UNAVAILABLE}}
+\fi
\ifx\InputIfFileExists\@undefined
\newread\@inputcheck
\long\def\InputIfFileExists#1#2#3{%
@@ -119,7 +132,7 @@
============================================================%
}%
}
-\protected\long\def\BEGINTEST#1{%
+\csname protected\endcsname\long\def\BEGINTEST#1{%
\global\advance\gTESTint by 1 %
\SEPARATOR
\LONGTYPEOUT{TEST \the\gTESTint: \detokenize{#1}}%
@@ -127,7 +140,21 @@
\begingroup
\let\TYPE\LONGTYPEOUT
}
-\protected\long\def\ENDTEST{%
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname detokenize\endcsname\relax
+ \long\def\BEGINTEST#1{%
+ \global\advance\gTESTint by 1 %
+ \SEPARATOR
+ \begingroup
+ \toks0={#1}%
+ \LONGTYPEOUT{TEST \the\gTESTint: \the\toks0 }%
+ \endgroup
+ \SEPARATOR
+ \begingroup
+ \let\TYPE\LONGTYPEOUT
+ }
+\fi
+\csname protected\endcsname\long\def\ENDTEST{%
\endgroup
\SEPARATOR
\LONGTYPEOUT{}%
@@ -147,6 +174,62 @@
\def \YES {\TYPE{YES}}
\def \NO {\TYPE{NO}}
\def \NEWLINE {\TYPE{^^J}}
+\csname protected\endcsname\long\def\ASSERT#1#2{%
+ \begingroup
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \ifx\@tempa\@tempb
+ \TYPE{PASSED}%
+ \else
+ \TYPE{FAILED}%
+ \fi
+ \endgroup
+}
+\csname protected\endcsname\long\def\ASSERTSTR#1#2{%
+ \begingroup
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \edef\@tempa{\detokenize\expandafter{\@tempa}}%
+ \edef\@tempb{\detokenize\expandafter{\@tempb}}%
+ \ifx\@tempa\@tempb
+ \TYPE{PASSED}%
+ \else
+ \TYPE{FAILED}%
+ \fi
+ \endgroup
+}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname detokenize\endcsname\relax
+ \long\def\ASSERTSTR#1#2{%
+ \TYPE{FEATURE UNAVAILABLE}%
+ }
+\fi
+\ifnum 0%
+ \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
+ \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
+ >0 %
+ \ifx\pdfvariable\@undefined
+ \pdfcompresslevel=0 %
+ \pdfobjcompresslevel=0 %
+ \else
+ \pdfvariable compresslevel=0 %
+ \pdfvariable objcompresslevel=0 %
+ \fi
+\else
+ \ifnum 0%
+ \ifx\XeTeXversion\@undefined\else 1\fi
+ \ifx\kanjiskip\@undefined\else 1\fi
+ >0 %
+ \special{dvipdfmx:config z 0}% Compress level
+ \special{dvipdfmx:config C 0x40}% Object compression
+ \fi
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname protected\endcsname\relax
+ \reset@catcodes
+ \let\protected\undefined
+ \expandafter\endinput
+\fi
\ifx\pdfoutput\@undefined
\ifx\outputmode\@undefined
\else
@@ -201,26 +284,6 @@
}
\fi
\fi
-\ifnum 0%
- \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
- \ifx\outputmode\@undefined\else\ifnum\outputmode>0 1\fi\fi
- >0 %
- \ifx\pdfvariable\@undefined
- \pdfcompresslevel=0 %
- \pdfobjcompresslevel=0 %
- \else
- \pdfvariable compresslevel=0 %
- \pdfvariable objcompresslevel=0 %
- \fi
-\else
- \ifnum 0%
- \ifx\XeTeXversion\@undefined\else 1\fi
- \ifx\kanjiskip\@undefined\else 1\fi
- >0 %
- \special{dvipdfmx:config z 0}% Compress level
- \special{dvipdfmx:config C 0x40}% Object compression
- \fi
-\fi
\reset@catcodes
%%
%%