[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh441: Update test file for environment (with reversed) hooks (f4ea4de4)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Dec 12 01:06:57 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh441
Link       : https://github.com/latex3/latex2e/commit/f4ea4de4a715e357f7b798a20b4b216ed7d83129

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

commit f4ea4de4a715e357f7b798a20b4b216ed7d83129
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Dec 11 21:06:57 2020 -0300

    Update test file for environment (with reversed) hooks


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

f4ea4de4a715e357f7b798a20b4b216ed7d83129
 base/testfiles-lthooks/lthooks-026.lvt | 25 +++++++++++++++++--------
 base/testfiles-lthooks/lthooks-026.tlg | 26 ++++++++++++++++----------
 2 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/base/testfiles-lthooks/lthooks-026.lvt b/base/testfiles-lthooks/lthooks-026.lvt
index 8beed07e..f923441e 100644
--- a/base/testfiles-lthooks/lthooks-026.lvt
+++ b/base/testfiles-lthooks/lthooks-026.lvt
@@ -6,13 +6,13 @@
 \START
 
 
-\BeforeBeginEnvironment{quote}{\typeout{quote before}}
-\AtBeginEnvironment{quote}{\typeout{quote begin}}
-\AtEndEnvironment{quote}{\typeout{quote end}}
-\AfterEndEnvironment{quote}{\typeout{quote after}}
+\BeforeBeginEnvironment{quote}{\typeout{quote before}}% env/quote/before
+\AtBeginEnvironment{quote}{\typeout{quote begin}}%      env/quote/begin
+\AtEndEnvironment{quote}{\typeout{quote end}}%          env/quote/end
+\AfterEndEnvironment{quote}{\typeout{quote after}}%     env/quote/after
 
-\BeforeBeginEnvironment[foo]{quote}{\typeout{quote before 2}}
-\AtBeginEnvironment[bar]{quote}{\typeout{quote begin 2}}
+\BeforeBeginEnvironment[foo]{quote}{\typeout{quote before 2}}% env/quote/before
+\AtBeginEnvironment[bar]{quote}{\typeout{quote begin 2}}%      env/quote/begin
 
 
 \LogHook{env/quote/begin}
@@ -22,11 +22,20 @@
 
 \begin{quote} test 1 \end{quote}
 
-\AtEndEnvironment[baz]{quote}{\typeout{quote end 2}}
-\AfterEndEnvironment[foobar]{quote}{\typeout{quote after 2}}
+\AtEndEnvironment[baz]{quote}{\typeout{quote end 2}}%          env/quote/end
+\AfterEndEnvironment[foobar]{quote}{\typeout{quote after 2}}%  env/quote/after
 
 \LogHook{env/quote/after}
 
+\ExplSyntaxOn
+\cs_new_protected:Npn \test #1
+  { \typeout { #1~is~\__hook_if_reversed:nF {#1} { not~ } reversed } }
+\test { env/quote/before }
+\test { env/quote/begin }
+\test { env/quote/end }
+\test { env/quote/after }
+\ExplSyntaxOff
+
 \begin{quote} test 2 \end{quote}
 
 \end{document}
diff --git a/base/testfiles-lthooks/lthooks-026.tlg b/base/testfiles-lthooks/lthooks-026.tlg
index b5969f4b..40cf3d67 100644
--- a/base/testfiles-lthooks/lthooks-026.tlg
+++ b/base/testfiles-lthooks/lthooks-026.tlg
@@ -2,14 +2,15 @@ This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 -> The hook 'env/quote/begin':
 > Code chunks:
->     top-level -> \typeout {quote begin}
 >     bar -> \typeout {quote begin 2}
+> Document-level (top-level) code:
+>     -> \typeout {quote begin}
 > Extra code for next invocation:
 >     ---
 > Rules:
 >     ---
 > Execution order:
->     top-level, bar.
+>     bar.
 (../l3backend-dvips.def
 File: l3backend-dvips.def ....-..-.. L3 backend support: dvips
 \l__pdf_internal_box=\box...
@@ -35,29 +36,34 @@ 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 ....
-quote before
 quote before 2
-quote begin
+quote before
 quote begin 2
+quote begin
 quote end
 quote after
 -> The hook 'env/quote/after':
 > Code chunks:
->     top-level -> \typeout {quote after}
 >     foobar -> \typeout {quote after 2}
+> Document-level (top-level) code:
+>     -> \typeout {quote after}
 > Extra code for next invocation:
 >     ---
 > Rules:
 >     ---
 > Execution order (after reversal):
->     foobar, top-level.
-quote before
+>     foobar.
+env/quote/before is not reversed
+env/quote/begin is not reversed
+env/quote/end is not reversed
+env/quote/after is reversed
 quote before 2
-quote begin
+quote before
 quote begin 2
-quote end
+quote begin
 quote end 2
-quote after 2
+quote end
 quote after
+quote after 2
 [1
 ] (lthooks-026.aux)





More information about the latex3-commits mailing list.