[latex3-commits] [git/LaTeX3-latex3-latex2e] gh963: Tests (97471d67)
PhelypeOleinik
phelype.oleinik at latex-project.org
Mon Nov 28 05:42:17 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : gh963
Link : https://github.com/latex3/latex2e/commit/97471d67edf45fa17747a24077073ee2cc47ae12
>---------------------------------------------------------------
commit 97471d67edf45fa17747a24077073ee2cc47ae12
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date: Mon Nov 28 01:42:17 2022 -0300
Tests
>---------------------------------------------------------------
97471d67edf45fa17747a24077073ee2cc47ae12
base/testfiles-ltcmd/github-0963.lvt | 50 ++++++++++++++++-----
base/testfiles-ltcmd/github-0963.tlg | 84 +++++++++++++++++-------------------
2 files changed, 79 insertions(+), 55 deletions(-)
diff --git a/base/testfiles-ltcmd/github-0963.lvt b/base/testfiles-ltcmd/github-0963.lvt
index 9f49852b..d0a55b25 100644
--- a/base/testfiles-ltcmd/github-0963.lvt
+++ b/base/testfiles-ltcmd/github-0963.lvt
@@ -1,36 +1,64 @@
\input{test2e}
-\let\errorstopmode\nonstopmode % because that is explicitly used in \ShowEnvironment
+% \let\errorstopmode\nonstopmode % because that is explicitly used in \ShowEnvironment
% and we dont# want to stop in the tests
\START
-
+\newcommand\cfoo[1]{\typeout{command foo -> #1}}
\newenvironment{foo}{\typeout{start foo}}{\typeout{end foo}}
+\typeout{---------- New: no error ----------}
+\NewCommandCopy\cbaz\cfoo
\NewEnvironmentCopy{baz}{foo}
+\cbaz{baz}
\begin{baz} \typeout{in baz} \end{baz}
-% try again (should not work)
+\typeout{---------- Renew: no error --------}
+\let\cbar\bar % bar is defined
+\RenewCommandCopy\cbar\cfoo
+\RenewEnvironmentCopy{bar}{foo}
-\NewEnvironmentCopy{baz}{foo}
+\cbar{bar}
+\begin{bar} \typeout{in bar} \end{bar}
+
+\typeout{---------- New: with error --------}
+\NewCommandCopy\cbaz\cfoo
+\NewEnvironmentCopy{baz}{foo} % says "Command \baz already defined". Fix?
+\cbaz{baz}
\begin{baz} \typeout{in baz} \end{baz}
-\RenewDocumentEnvironment{foo}{}{\typeout{start foo2}}{\typeout{end foo2}}
+\typeout{---------- Renew: with error ------}
+\RenewCommandCopy\cboo\cfoo
+\RenewEnvironmentCopy{boo}{foo}
+\cboo{boo}
+\begin{boo} \typeout{in boo} \end{boo}
+
+\typeout{---------- ltcmd env --------------}
+\RenewDocumentEnvironment{foo}{m}{\typeout{start foo #1}}{\typeout{end foo #1}}
\RenewEnvironmentCopy{baz}{foo}
-\begin{baz} \typeout{in baz} \end{baz}
+\begin{baz}{X} \typeout{in baz} \end{baz}
+
+\typeout{---------- end part defined -------}
+\NewEnvironmentCopy{group}{foo}
+\show\group
+\show\endgroup
+
+
+
+% \stop
% ouch
-\NewEnvironmentCopy{group}{foo}
-\ShowCommand\group
-\ShowCommand\endgroup
+% \ShowCommand\group
+% \ShowCommand\endgroup
-\ShowEnvironment{foo}
-\ShowEnvironment{center}
+% \tracingall\tracinglostchars=3 \errorsropmode
+% \ShowEnvironment{foo}
+% \ShowEnvironment{center}
\END
diff --git a/base/testfiles-ltcmd/github-0963.tlg b/base/testfiles-ltcmd/github-0963.tlg
index 21f51ec7..5c8256cc 100644
--- a/base/testfiles-ltcmd/github-0963.tlg
+++ b/base/testfiles-ltcmd/github-0963.tlg
@@ -1,33 +1,64 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
+---------- New: no error ----------
+command foo -> baz
start foo
in baz
end foo
-! LaTeX Error: Command \baz already defined.
+---------- Renew: no error --------
+command foo -> bar
+start foo
+in bar
+end foo
+---------- New: with error --------
+! LaTeX Error: Command \cbaz already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
-l. ...\NewEnvironmentCopy{baz}{foo}
+l. ...\NewCommandCopy\cbaz\cfoo
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
-! LaTeX Error: Command \endbaz already defined.
+! LaTeX Error: Command \baz already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l. ...\NewEnvironmentCopy{baz}{foo}
+ % says "Command \baz already defined". Fix?
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
+command foo -> baz
start foo
in baz
end foo
-start foo2
+---------- Renew: with error ------
+! LaTeX Error: Command \cboo undefined.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+l. ...\RenewCommandCopy\cboo\cfoo
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
+! LaTeX Error: Environment boo undefined.
+See the LaTeX manual or LaTeX Companion for explanation.
+Type H <return> for immediate help.
+ ...
+l. ...\RenewEnvironmentCopy{boo}{foo}
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
+command foo -> boo
+start foo
+in boo
+end foo
+---------- ltcmd env --------------
+start foo X
in baz
-end foo2
-! LaTeX Error: Command \endgroup already defined.
+end foo X
+---------- end part defined -------
+! LaTeX Error: Command \group already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
@@ -36,42 +67,7 @@ l. ...\NewEnvironmentCopy{group}{foo}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
-> \begin{group}=document environment:
-->\typeout {start foo2}.
-<recently read> }
-l. ...\ShowCommand\group
-> \end{group}:
-->\scan_stop: .
-<recently read> }
-l. ...\ShowCommand\group
+> \group=\endgroup.
+l. ...\show\group
> \endgroup=\endgroup.
-<argument> \endgroup
-l. ...\ShowCommand\endgroup
-Begin code for environment foo:
-> \begin{foo}=document environment:
-->\typeout {start foo2}.
-<recently read> }
-l. ...\ShowEnvironment{foo}
-> \end{foo}:
-->\typeout {end foo2}.
-<recently read> }
-l. ...\ShowEnvironment{foo}
-End code for environment foo:
-> \begin{foo}=document environment:
-->\typeout {start foo2}.
-<recently read> }
-l. ...\ShowEnvironment{foo}
-> \end{foo}:
-->\typeout {end foo2}.
-<recently read> }
-l. ...\ShowEnvironment{foo}
-Begin code for environment center:
-> \center=macro:
-->\trivlist \centering \item \relax .
-<argument> \center
-l. ...\ShowEnvironment{center}
-End code for environment center:
-> \endcenter=macro:
-->\endtrivlist .
-<argument> \endcenter
-l. ...\ShowEnvironment{center}
+l. ...\show\endgroup
More information about the latex3-commits
mailing list.