[latex3-commits] [git/LaTeX3-latex3-latex2e] gh625: Update test files (296cc2ce)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Jul 23 02:54:14 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh625
Link       : https://github.com/latex3/latex2e/commit/296cc2ce50114700879063d1e4ea64e7614f17a7

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

commit 296cc2ce50114700879063d1e4ea64e7614f17a7
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Jul 22 21:54:14 2021 -0300

    Update test files
    
    Some tests relied on the behaviour of \RemoveFromHook, so now they error


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

296cc2ce50114700879063d1e4ea64e7614f17a7
 base/testfiles-lthooks/lthooks-001.lvt   |  3 +-
 base/testfiles-lthooks/lthooks-001.tlg   | 18 ++++++++++++
 base/testfiles-lthooks/lthooks-002.lvt   |  3 +-
 base/testfiles-lthooks/lthooks-002.tlg   | 18 ++++++++++++
 base/testfiles-lthooks2/lthooks2-006.tlg | 49 ++++++++++++++++++++++++++++++--
 5 files changed, 86 insertions(+), 5 deletions(-)

diff --git a/base/testfiles-lthooks/lthooks-001.lvt b/base/testfiles-lthooks/lthooks-001.lvt
index 55ca288f..4107712d 100644
--- a/base/testfiles-lthooks/lthooks-001.lvt
+++ b/base/testfiles-lthooks/lthooks-001.lvt
@@ -24,7 +24,8 @@
 
 
 \hook_gremove_code:nn{xxx}{label2}
-\hook_gremove_code:nn{xxx}{label3}
+\hook_gremove_code:nn{xxx}{label3} % errors because label3 doesn't exist
+\hook_gremove_code:nn{yyy}{label3} % errors because yyy doesn't exist
 
 \prop_log:N \g__hook_xxx_code_prop
 
diff --git a/base/testfiles-lthooks/lthooks-001.tlg b/base/testfiles-lthooks/lthooks-001.tlg
index 42fce347..bd3e95bb 100644
--- a/base/testfiles-lthooks/lthooks-001.tlg
+++ b/base/testfiles-lthooks/lthooks-001.tlg
@@ -109,6 +109,24 @@ All initialized (non-empty) hooks:
  file/after/ulem.sty -> \__hook_toplevel file/after/ulem.sty \def \@hspace ##1{\begingroup \setlength \skip@ {##1}\edef \x {\endgroup \hskip \the \skip@ \relax }\x }\__hook_next file/after/ulem.sty  
  file/after/varwidth.sty -> \__hook_toplevel file/after/varwidth.sty \FirstAidNeededT {varwidth}{sty}{....-..-.. ver 0.92; \space Variable-width minipages}{\def \@vwid at sift {\skip@ \lastskip \unskip \ifdim \lastskip =\z@ \unskip \fi \dimen@ \lastkern \unkern \count@ \lastpenalty \unpenalty \setbox \z@ \lastbox \ifvoid \z@ \advance \sift at deathcycles \@ne \else \sift at deathcycles \z@ \fi \ifnum \sift at deathcycles >33 \let \@vwid at sift \relax \PackageWarning {varwidth}{Failed to reprocess entire contents}\fi \ifnum \count@ =\@vwid at preeqp \@vwid at eqmodefalse \fi \ifnum \count@ =\@vwid at posteqp \@vwid at eqmodetrue \fi \ifnum \count@ =\@vwid at toppen \let \@vwid at sift \relax \else \ifnum \count@ =\@vwid at offsets \@vwid at setoffsets \else \ifnum \count@ =\@vwid at postw \else \@vwid at resetb \fi \@vwid at append \fi \fi \@vwid at sift }}\__hook_next file/after/varwidth.sty  
  xxx -> foobar\__hook_toplevel xxx \__hook_next xxx  
+! LaTeX hooks Error: Cannot remove chunk 'label3' from hook 'xxx' because it
+(hooks)              does not exist in that hook.
+Type <return> to continue.
+ ...                                              
+l. ...\hook_gremove_code:nn{xxx}{label3}
+                                        % errors because label3 doesn't exist
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
+! LaTeX hooks Error: Cannot remove chunk 'label3' from hook 'yyy' because the
+(hooks)              hook does not exist.
+Type <return> to continue.
+ ...                                              
+l. ...\hook_gremove_code:nn{yyy}{label3}
+                                        % errors because yyy doesn't exist
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
 The property list \g__hook_xxx_code_prop contains the pairs (without outer
 braces):
 >  {label1}  =>  {foo}.
diff --git a/base/testfiles-lthooks/lthooks-002.lvt b/base/testfiles-lthooks/lthooks-002.lvt
index 81baaf13..9e4ff00a 100644
--- a/base/testfiles-lthooks/lthooks-002.lvt
+++ b/base/testfiles-lthooks/lthooks-002.lvt
@@ -24,7 +24,8 @@
 \ExplSyntaxOff
 
 \RemoveFromHook{xxx}[label2]
-\RemoveFromHook{xxx}[label3]
+\RemoveFromHook{xxx}[label3] % errors because label3 doesn't exist
+\RemoveFromHook{yyy}[label3] % errors because yyy doesn't exist
 \AddToHook{xxx}{baz}           % this becomes top-level
 
 
diff --git a/base/testfiles-lthooks/lthooks-002.tlg b/base/testfiles-lthooks/lthooks-002.tlg
index 8de46041..9a5b8e83 100644
--- a/base/testfiles-lthooks/lthooks-002.tlg
+++ b/base/testfiles-lthooks/lthooks-002.tlg
@@ -109,6 +109,24 @@ All initialized (non-empty) hooks:
  file/after/ulem.sty -> \__hook_toplevel file/after/ulem.sty \def \@hspace ##1{\begingroup \setlength \skip@ {##1}\edef \x {\endgroup \hskip \the \skip@ \relax }\x }\__hook_next file/after/ulem.sty  
  file/after/varwidth.sty -> \__hook_toplevel file/after/varwidth.sty \FirstAidNeededT {varwidth}{sty}{....-..-.. ver 0.92; \space Variable-width minipages}{\def \@vwid at sift {\skip@ \lastskip \unskip \ifdim \lastskip =\z@ \unskip \fi \dimen@ \lastkern \unkern \count@ \lastpenalty \unpenalty \setbox \z@ \lastbox \ifvoid \z@ \advance \sift at deathcycles \@ne \else \sift at deathcycles \z@ \fi \ifnum \sift at deathcycles >33 \let \@vwid at sift \relax \PackageWarning {varwidth}{Failed to reprocess entire contents}\fi \ifnum \count@ =\@vwid at preeqp \@vwid at eqmodefalse \fi \ifnum \count@ =\@vwid at posteqp \@vwid at eqmodetrue \fi \ifnum \count@ =\@vwid at toppen \let \@vwid at sift \relax \else \ifnum \count@ =\@vwid at offsets \@vwid at setoffsets \else \ifnum \count@ =\@vwid at postw \else \@vwid at resetb \fi \@vwid at append \fi \fi \@vwid at sift }}\__hook_next file/after/varwidth.sty  
  xxx -> foobar\__hook_toplevel xxx \__hook_next xxx  
+! LaTeX hooks Error: Cannot remove chunk 'label3' from hook 'xxx' because it
+(hooks)              does not exist in that hook.
+Type <return> to continue.
+ ...                                              
+l. ...\RemoveFromHook{xxx}[label3]
+                                  % errors because label3 doesn't exist
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
+! LaTeX hooks Error: Cannot remove chunk 'label3' from hook 'yyy' because the
+(hooks)              hook does not exist.
+Type <return> to continue.
+ ...                                              
+l. ...\RemoveFromHook{yyy}[label3]
+                                  % errors because yyy doesn't exist
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
 **** Add to hook xxx (top-level) on input line ... <- baz
 The property list \g__hook_xxx_code_prop contains the pairs (without outer
 braces):
diff --git a/base/testfiles-lthooks2/lthooks2-006.tlg b/base/testfiles-lthooks2/lthooks2-006.tlg
index fa54daa9..f8a763bc 100644
--- a/base/testfiles-lthooks2/lthooks2-006.tlg
+++ b/base/testfiles-lthooks2/lthooks2-006.tlg
@@ -53,6 +53,14 @@ Now there are no code chunks:
 -> The hook 'some-hook-b':
 > The hook is not declared.
 > The hook is empty.
+! LaTeX hooks Error: Cannot remove chunk 'my-package' from hook 'some-hook-a'
+(hooks)              because it does not exist in that hook.
+Type <return> to continue.
+ ...                                              
+l. ...\RemoveFromHook{some-hook-a}[my-package]
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
 -------------------
 No code:
 -> The hook 'some-hook-a':
@@ -64,7 +72,24 @@ Adding a rule:
 -------------------
 Still no code:
 -> The hook 'some-hook-a':
-> The hook is empty.
+> Code chunks:
+>     my-package -> CODE
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     my-package.
+! LaTeX hooks Error: Cannot remove chunk 'my-package' from hook 'some-hook-b'
+(hooks)              because it does not exist in that hook.
+Type <return> to continue.
+ ...                                              
+l. ...\RemoveFromHook{some-hook-b}[my-package]
+LaTeX does not know anything more about this error, sorry.
+Try typing <return> to proceed.
+If that doesn't work, type X <return> to quit.
 -------------------
 No code:
 -> The hook 'some-hook-b':
@@ -73,9 +98,27 @@ No code:
 -------------------
 Adding a rule:
 -> The hook 'some-hook-a':
-> The hook is empty.
+> Code chunks:
+>     my-package -> CODE
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     my-package.
 -------------------
 Still no code:
 -> The hook 'some-hook-b':
 > The hook is not declared.
-> The hook is empty.
+> Code chunks:
+>     my-package -> CODE
+> Document-level (top-level) code:
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     Not set because the hook is undeclared.





More information about the latex3-commits mailing list.