[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks-doc-updates: Simplify test files (46139582)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Aug 6 06:57:26 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : lthooks-doc-updates
Link       : https://github.com/latex3/latex2e/commit/46139582fa02a4d5fed8b48fabbd6216ba358955

>---------------------------------------------------------------

commit 46139582fa02a4d5fed8b48fabbd6216ba358955
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Aug 6 01:57:26 2021 -0300

    Simplify test files


>---------------------------------------------------------------

46139582fa02a4d5fed8b48fabbd6216ba358955
 base/testfiles-lthooks/lthooks-029-deprecated.tlg  | 12 -----
 base/testfiles-lthooks/lthooks-029.lvt             | 36 +++++----------
 base/testfiles-lthooks/lthooks-029.tlg             | 52 +++++-----------------
 .../lthooks-errors-deprecated.tlg                  | 12 -----
 4 files changed, 20 insertions(+), 92 deletions(-)

diff --git a/base/testfiles-lthooks/lthooks-029-deprecated.tlg b/base/testfiles-lthooks/lthooks-029-deprecated.tlg
index 7c050942..1571972b 100644
--- a/base/testfiles-lthooks/lthooks-029-deprecated.tlg
+++ b/base/testfiles-lthooks/lthooks-029-deprecated.tlg
@@ -103,12 +103,6 @@ LaTeX hooks Warning: Command \ProvideReversedHook is deprecated and will be
 (hooks)              removed in a future release.
 (hooks)              
 (hooks)              Use \ActivateGenericHook instead.
-! LaTeX hooks Error: Hook 'aaa' already declared as a normal hook!
-For immediate help type H <return>.
- ...                                              
-l. ...\ProvideReversedHook{aaa}
-You attempted to activate the hook 'aaa' as a reversed hook, but it was
-already previously declared as a normal hook. A redeclaration is not possible.
 -> The hook 'aaa':
 > Code chunks:
 >     X -> X1
@@ -123,12 +117,6 @@ already previously declared as a normal hook. A redeclaration is not possible.
 <recently read> }
 l. ...\ShowHook{aaa}
 ------------ provide an normal hook on an existing reversed hook --------------
-! LaTeX hooks Error: Hook 'ccc' already declared as a reversed hook!
-For immediate help type H <return>.
- ...                                              
-l. ...\ActivateGenericHook{ccc}
-You attempted to activate the hook 'ccc' as a normal hook, but it was already
-previously declared as a reversed hook. A redeclaration is not possible.
 -> The hook 'ccc':
 > Code chunks:
 >     Z -> Z1
diff --git a/base/testfiles-lthooks/lthooks-029.lvt b/base/testfiles-lthooks/lthooks-029.lvt
index e2a19005..e807e89e 100644
--- a/base/testfiles-lthooks/lthooks-029.lvt
+++ b/base/testfiles-lthooks/lthooks-029.lvt
@@ -12,8 +12,8 @@
 \typeout{------------ all unknown --------------}
 
 \ShowHook{aaa}
-\ShowHook{bbb}
-\ShowHook{ccc}
+\ShowHook{env/bbb/begin}
+\ShowHook{env/ccc/end}
 
 \NewHook{aaa}
 \ShowHook{aaa}
@@ -30,37 +30,23 @@
 \ActivateGenericHook{aaa}
 \ShowHook{aaa}
 
-\AddToHook{bbb}[Y]{Y1}
+\AddToHook{env/bbb/begin}[Y]{Y1}
 
 \typeout{------------ activate an unknown hook with data --------------}
 
-\ActivateGenericHook{bbb}
-\ShowHook{bbb}
-\ActivateGenericHook{bbb}
-\ShowHook{bbb}
+\ActivateGenericHook{env/bbb/begin}
+\ShowHook{env/bbb/begin}
 
 \typeout{------------ activate an unknown reversed hook --------------}
 
-\ActivateGenericHook{ccc}
-\ShowHook{ccc}
-
-\typeout{------------ activate an known reversed hook --------------}
-
-\ActivateGenericHook{ccc}
-\ShowHook{ccc}
-
-\AddToHook{ccc}[Z]{Z1}
+\ActivateGenericHook{env/ccc/end}
+\ShowHook{env/ccc/end}
 
 \typeout{------------ activate an known reversed hook with data --------------}
 
-\ActivateGenericHook{ccc}
-\ShowHook{ccc}
-
-
-\typeout{------------ activate an normal hook on an existing reversed hook --------------}
-
-\ActivateGenericHook{ccc}
-\ShowHook{ccc}
+\AddToHook{env/ccc/end}[Z]{Z1}
+\ActivateGenericHook{env/ccc/end}
+\ShowHook{env/ccc/end}
 
 \typeout{------------ activate hook that was disabled --------------}
 
@@ -68,6 +54,4 @@
 \ActivateGenericHook{ddd}
 \ShowHook{ddd}
 
-
-
 \END
diff --git a/base/testfiles-lthooks/lthooks-029.tlg b/base/testfiles-lthooks/lthooks-029.tlg
index 300bbd10..197ae5be 100644
--- a/base/testfiles-lthooks/lthooks-029.tlg
+++ b/base/testfiles-lthooks/lthooks-029.tlg
@@ -6,16 +6,16 @@ Don't change this file in any respect.
 > The hook is empty.
 <recently read> }
 l. ...\ShowHook{aaa}
--> The hook 'bbb':
+-> The hook 'env/bbb/begin':
 > The hook is not declared.
 > The hook is empty.
 <recently read> }
-l. ...\ShowHook{bbb}
--> The hook 'ccc':
+l. ...\ShowHook{env/bbb/begin}
+-> The hook 'env/ccc/end':
 > The hook is not declared.
 > The hook is empty.
 <recently read> }
-l. ...\ShowHook{ccc}
+l. ...\ShowHook{env/ccc/end}
 -> The hook 'aaa':
 > The hook is empty.
 <recently read> }
@@ -40,7 +40,7 @@ l. ...\ShowHook{aaa}
 <recently read> }
 l. ...\ShowHook{aaa}
 ------------ activate an unknown hook with data --------------
--> The hook 'bbb':
+-> The hook 'env/bbb/begin':
 > Code chunks:
 >     Y -> Y1
 > Document-level (top-level) code (executed last):
@@ -52,46 +52,14 @@ l. ...\ShowHook{aaa}
 > Execution order:
 >     Y.
 <recently read> }
-l. ...\ShowHook{bbb}
--> The hook 'bbb':
-> Code chunks:
->     Y -> Y1
-> Document-level (top-level) code (executed last):
->     ---
-> Extra code for next invocation:
->     ---
-> Rules:
->     ---
-> Execution order:
->     Y.
-<recently read> }
-l. ...\ShowHook{bbb}
+l. ...\ShowHook{env/bbb/begin}
 ------------ activate an unknown reversed hook --------------
--> The hook 'ccc':
-> The hook is empty.
-<recently read> }
-l. ...\ShowHook{ccc}
------------- activate an known reversed hook --------------
--> The hook 'ccc':
+-> The hook 'env/ccc/end':
 > The hook is empty.
 <recently read> }
-l. ...\ShowHook{ccc}
+l. ...\ShowHook{env/ccc/end}
 ------------ activate an known reversed hook with data --------------
--> The hook 'ccc':
-> Code chunks:
->     Z -> Z1
-> Document-level (top-level) code (executed last):
->     ---
-> Extra code for next invocation:
->     ---
-> Rules:
->     ---
-> Execution order:
->     Z.
-<recently read> }
-l. ...\ShowHook{ccc}
------------- activate an normal hook on an existing reversed hook --------------
--> The hook 'ccc':
+-> The hook 'env/ccc/end':
 > Code chunks:
 >     Z -> Z1
 > Document-level (top-level) code (executed last):
@@ -103,7 +71,7 @@ l. ...\ShowHook{ccc}
 > Execution order:
 >     Z.
 <recently read> }
-l. ...\ShowHook{ccc}
+l. ...\ShowHook{env/ccc/end}
 ------------ activate hook that was disabled --------------
 LaTeX hooks Warning: Cannot activate hook 'ddd' because it is disabled!
 -> The hook 'ddd':
diff --git a/base/testfiles-lthooks/lthooks-errors-deprecated.tlg b/base/testfiles-lthooks/lthooks-errors-deprecated.tlg
index 1a5fafd9..a6db2b70 100644
--- a/base/testfiles-lthooks/lthooks-errors-deprecated.tlg
+++ b/base/testfiles-lthooks/lthooks-errors-deprecated.tlg
@@ -10,18 +10,6 @@ LaTeX hooks Warning: Command \ProvideReversedHook is deprecated and will be
 (hooks)              removed in a future release.
 (hooks)              
 (hooks)              Use \ActivateGenericHook instead.
-! LaTeX hooks Error: Hook 'xxx' already declared as a normal hook!
-For immediate help type H <return>.
- ...                                              
-l. ...\ProvideReversedHook{xxx}
-You attempted to activate the hook 'xxx' as a reversed hook, but it was
-already previously declared as a normal hook. A redeclaration is not possible.
-! LaTeX hooks Error: Hook 'yyy' already declared as a reversed hook!
-For immediate help type H <return>.
- ...                                              
-l. ...\ActivateGenericHook{yyy}
-You attempted to activate the hook 'yyy' as a normal hook, but it was already
-previously declared as a reversed hook. A redeclaration is not possible.
 LaTeX hooks Warning: Cannot activate hook 'yyy' because it is disabled!
 ! LaTeX hooks Error: Cannot add code to disabled hook 'yyy'.
 For immediate help type H <return>.





More information about the latex3-commits mailing list.