[latex3-commits] [git/LaTeX3-latex3-latex2e] gh606: Tests (07571128)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Sep 3 07:47:35 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh606
Link       : https://github.com/latex3/latex2e/commit/07571128d3a4ccdf850b0267a33cd632d1c1d695

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

commit 07571128d3a4ccdf850b0267a33cd632d1c1d695
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Sep 3 02:47:35 2021 -0300

    Tests


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

07571128d3a4ccdf850b0267a33cd632d1c1d695
 base/testfiles-lthooks/github-0606.lvt | 18 +++++++++++++-----
 base/testfiles-lthooks/github-0606.tlg | 25 ++++++++++++++++++++++---
 2 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/base/testfiles-lthooks/github-0606.lvt b/base/testfiles-lthooks/github-0606.lvt
index c760a22e..eddc7883 100644
--- a/base/testfiles-lthooks/github-0606.lvt
+++ b/base/testfiles-lthooks/github-0606.lvt
@@ -14,10 +14,18 @@
 
 \NewHook{A}
 \AddToHook{A}{\typeout{1}}
-\UseOneTimeHook{A}
-\UseOneTimeHook{A}
-\AddToHook{A}{\typeout{2}}
-\UseOneTimeHook{A}
-\UseHook{A}
+\UseOneTimeHook{A} % 1
+\UseOneTimeHook{A} % nothing
+\AddToHook{A}{\typeout{2}} % 2
+\UseOneTimeHook{A} % nothing
+\UseHook{A} % nothing
+
+% testing interface on a one time'd hook:
+\NewHook{A} % error "Hook 'A' has already been declared."
+\AddToHook{A}{\typeout{B}} % B
+\AddToHookNext{A}{\typeout{C}} % nothing
+\RemoveFromHook{A}[top-level]
+\DeclareHookRule{A}{b}{after}{c}
+\ShowHook{A} % The hook is empty.
 
 \END
diff --git a/base/testfiles-lthooks/github-0606.tlg b/base/testfiles-lthooks/github-0606.tlg
index 73751d47..82f9eced 100644
--- a/base/testfiles-lthooks/github-0606.tlg
+++ b/base/testfiles-lthooks/github-0606.tlg
@@ -1,7 +1,26 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 1
-1
 2
-1
-1
+! LaTeX hooks Error: Hook 'A' has already been declared.
+For immediate help type H <return>.
+ ...                                              
+l. ...\NewHook{A}
+                 % error "Hook 'A' has already been declared."
+There already exists a hook declaration with this name.
+Please use a different name for your hook.
+B
+-> The hook 'A':
+> Code chunks:
+>     ---
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     -> \typeout {C}
+> Rules:
+>     ---
+> Execution order:
+>     ---.
+<recently read> }
+l. ...\ShowHook{A}
+                  % The hook is empty.





More information about the latex3-commits mailing list.