[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks2: updated test for #360 --- result is currently wrong: needs etoolbox change (6fcb88ae)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Aug 21 21:06:48 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : lthooks2
Link       : https://github.com/latex3/latex2e/commit/6fcb88ae3c1344a85c1aa9d0127ef6ba40db5716

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

commit 6fcb88ae3c1344a85c1aa9d0127ef6ba40db5716
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Aug 21 21:06:48 2020 +0200

    updated test for #360 --- result is currently wrong: needs etoolbox change


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

6fcb88ae3c1344a85c1aa9d0127ef6ba40db5716
 base/lthooks.dtx                                   |  2 +-
 base/testfiles-lthooks/github-0360.lvt             | 21 ---------------
 base/testfiles-lthooks2/github-0360.lvt            | 30 ++++++++++++++++++++++
 .../github-0360.tlg                                | 12 +++++----
 4 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 3543b0cd..3eb2a2fa 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -1242,7 +1242,7 @@
 %
 %    \item[\hook{begindocument/before}]
 %
-%      This hook executed at the very start of \cs{document}, one can
+%      This hook is executed at the very start of \cs{document}, one can
 %      think of it as a hook for code at the end of the preamble
 %      section and this is how it it is used by \pkg{etoolbox}'s
 %      \cs{AtEndPreamble}.
diff --git a/base/testfiles-lthooks/github-0360.lvt b/base/testfiles-lthooks/github-0360.lvt
deleted file mode 100644
index 92685df8..00000000
--- a/base/testfiles-lthooks/github-0360.lvt
+++ /dev/null
@@ -1,21 +0,0 @@
-\documentclass{article}
-
-%\DebugHookOn
-
-\input{regression-test}
-
-\AddToHook{begindocument}{%
-  \typeout{+++++ check}%
-  \AddToHook{begindocument}{\typeout{+++++ check nested}}
-}
-\AddToHook{env/document/begin}{%
-  \typeout{***** check}%
-  \AddToHook{env/document/begin}{\typeout{***** check nested}}
-}
-
-\START
-
-\begin{document}
-test
-
-\END
diff --git a/base/testfiles-lthooks2/github-0360.lvt b/base/testfiles-lthooks2/github-0360.lvt
new file mode 100644
index 00000000..472b8081
--- /dev/null
+++ b/base/testfiles-lthooks2/github-0360.lvt
@@ -0,0 +1,30 @@
+\documentclass{article}
+
+\input{regression-test}
+
+\usepackage{etoolbox}
+
+%\DebugHooksOn
+
+\START
+
+\AddToHook{begindocument}{%
+  \typeout{+++begindocument+++ check}%
+  \AddToHook{begindocument}{\typeout{+++begindocument+++ check nested}}
+}
+\AddToHook{env/document/begin}{%
+  \typeout{+++env/document/begin+++ check}%
+  \typeout{XXXX -------- Correct: nesting not executed}%
+  \AddToHook{env/document/begin}{\typeout{+++env/document/begin+++ check nested}}
+}
+
+\AtEndPreamble{%
+  \typeout{+++endpreamble+++ check}%
+  \typeout{XXXX -------- Currently wrong: nesting not executed}%
+  \AtEndPreamble{\typeout{+++endpreamble+++ check nested}}
+}
+
+\begin{document}
+test
+
+\END
diff --git a/base/testfiles-lthooks/github-0360.tlg b/base/testfiles-lthooks2/github-0360.tlg
similarity index 84%
rename from base/testfiles-lthooks/github-0360.tlg
rename to base/testfiles-lthooks2/github-0360.tlg
index 046219b7..94f6d42b 100644
--- a/base/testfiles-lthooks/github-0360.tlg
+++ b/base/testfiles-lthooks2/github-0360.tlg
@@ -1,6 +1,9 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-***** check
++++env/document/begin+++ check
+XXXX -------- Correct: nesting not executed
++++endpreamble+++ check
+XXXX -------- Currently wrong: nesting not executed
 (../l3backend-dvips.def
 File: l3backend-dvips.def ....-..-.. L3 backend support: dvips
 \l__pdf_internal_box=\box...
@@ -10,8 +13,7 @@ File: l3backend-dvips.def ....-..-.. L3 backend support: dvips
 \g__pdf_backend_annotation_int=\count...
 \g__pdf_backend_link_int=\count...
 \g__pdf_backend_link_sf_int=\count...
-)
-No file github-0360.aux.
+) (github-0360.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -26,5 +28,5 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
-+++++ check
-+++++ check nested
++++begindocument+++ check
++++begindocument+++ check nested





More information about the latex3-commits mailing list.