From d212bc2226cda2f9625245d68acc91b6d54459d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LAURENS=20J=C3=A9r=C3=B4me?= Date: Tue, 16 Jan 2024 13:21:16 +0100 Subject: [PATCH] lthooks: new show related tests to fix issue #1243 - `lthooks-show-2020-10-01.lvt` is frozen at the 2020-10-01 release, no arguments in hooks - `update-lthooks-tests.sh` includes the above test - `lthooks-show.sty` is a library of test helpers. They will be used by forthcoming tests, as well as completed. --- base/lthooks.dtx | 8 +- .../helpers/lthooks-show.sty | 111 +++ .../lthooks-show-2020-10-01.lvt | 86 ++ .../lthooks-show-2020-10-01.tlg | 845 ++++++++++++++++++ base/update-lthooks-tests.sh | 1 + 5 files changed, 1049 insertions(+), 2 deletions(-) create mode 100644 base/testfiles-lthooks/helpers/lthooks-show.sty create mode 100644 base/testfiles-lthooks/lthooks-show-2020-10-01.lvt create mode 100644 base/testfiles-lthooks/lthooks-show-2020-10-01.tlg diff --git a/base/lthooks.dtx b/base/lthooks.dtx index 117cc724b..e6d65a6d9 100644 --- a/base/lthooks.dtx +++ b/base/lthooks.dtx @@ -3942,10 +3942,12 @@ % % \changes{v1.0s}{2021/09/28} % {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/675)} +% \changes{v1.0w}{2024/01/22} +% {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/1243)} % \begin{macrocode} %\cs_new_protected:Npn \@@_try_declaring_generic_hook:nNNnn #1 % { -% \@@_if_file_hook:wTF #1 / \s_@@_mark +% \@@_if_file_hook:wTF #1 / / \s_@@_mark % { % \exp_args:Ne % \@@_try_declaring_generic_hook_split:nNNnn @@ -6785,10 +6787,12 @@ % % \changes{v1.0s}{2021/09/28} % {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/675)} +% \changes{v1.0w}{2024/01/22} +% {Correct usage of older \cs{@@_if_file_hook:wTF} (gh/1243)} % \begin{macrocode} %\cs_new_protected:Npn \@@_try_file_hook:n #1 % { -% \@@_if_file_hook:wTF #1 / \s_@@_mark +% \@@_if_file_hook:wTF #1 / / \s_@@_mark % { % \exp_args:Ne \@@_if_usable_use:n % { \exp_args:Ne \@@_file_hook_normalize:n {#1} } diff --git a/base/testfiles-lthooks/helpers/lthooks-show.sty b/base/testfiles-lthooks/helpers/lthooks-show.sty new file mode 100644 index 000000000..319a8df32 --- /dev/null +++ b/base/testfiles-lthooks/helpers/lthooks-show.sty @@ -0,0 +1,111 @@ +% This is a library of commands used by various `lthooks*.lvt` + +\IncludeInRelease{2020-10-01}{\TESTBlockHook}{Message} + +\def\DebugShowHookEnv#1{ + \ShowHook{env/#1/before} + \ShowHook{env/#1/begin} + \ShowHook{env/#1/end} + \ShowHook{env/#1/after} +} + +\def\DebugShowHookCmd#1{ + \ShowHook{cmd/#1/before} + \ShowHook{cmd/#1/after} +} + +\def\TESTBlockHookEnv#1#2{ +% run at the top level +% #1: the title of the block +% #2: the name of the environment + \BEGINTEST{Environment: #2} + \DebugShowHookEnv{#2} + \AddToHook{env/#2/before}{\TYPE{<#2 BEFORE>}} + \AddToHook{env/#2/begin}{\TYPE{<#2 BEGIN>}} + \AddToHook{env/#2/end}{\TYPE{<#2 END>}} + \AddToHook{env/#2/after}{\TYPE{<#2 AFTER>}} + \DebugShowHookEnv{#2} + \ENDTEST +} + +\def\TESTBlockHookCmd#1#2{ +% run at the top level +% #1: the title of the block +% #2: the csname of the command + \BEGINTEST{Command: #1} + \DebugShowHookCmd{#2} + \AddToHook{cmd/#2/before}{\TYPE{<#2 BEFORE>}} + \AddToHook{cmd/#2/after}{\TYPE{<#2 AFTER>}} + \DebugShowHookCmd{#2} + \ENDTEST +} +\def\TESTBlockHookCustomGeneric#1#2{ +% run at the top level +% #1: the title of the block +% #2: the name of the hook + \BEGINTEST{Custom generic hook: #1} + \def\TEST{ + \UseHook{#2} + \ShowHook{#2} + } + \BEGINTEST{Raw: #2} + \AddToHook{#2}[LABEL]{\TYPE{<#2 CODE>}} + \TEST + \ENDTEST + \BEGINTEST{Activated: #2} + \ActivateGenericHook{#2} + \TEST + \ENDTEST + \BEGINTEST{Disabled: #2} + \DisableGenericHook{#2} + \TEST + \ENDTEST + \ENDTEST +} +\def\TESTBlockHook#1#2{ +% run at the top level +% #1: the title of the block +% #2: the name of the hook + \BEGINTEST{#1} + \def\TEST{ + \UseHook{#2} + \ShowHook{#2} + } + \BEGINTEST{Undeclared #2} + \TEST + \ENDTEST + \BEGINTEST{#2 + TOP LEVEL} + \AddToHook{#2}{\TYPE{<#2 TOP-LEVEL>}} + \TEST + \ENDTEST + \BEGINTEST{#2 + A LABEL} + \AddToHook{#2}[A LABEL]{\TYPE{<#2 A CODE>}} + \TEST + \ENDTEST + \BEGINTEST{#2 + B LABEL} + \AddToHook{#2}[B LABEL]{\TYPE{<#2 B CODE>}} + \TEST + \ENDTEST + \BEGINTEST{#2 + C LABEL} + \AddToHook{#2}[C LABEL]{\TYPE{<#2 C CODE>}} + \TEST + \ENDTEST + \BEGINTEST{#2 + NEXT} + \AddToHookNext{#2}{\TYPE{}} + \ShowHook{#2} + \TEST + \ENDTEST + \BEGINTEST{#2 + C LABEL < A LABEL} + \DeclareHookRule{#2}{C LABEL}{before}{A LABEL} + \TEST + \ENDTEST + \BEGINTEST{#2 + DEFAULT: B LABEL > C LABEL} + \DeclareDefaultHookRule{B LABEL}{after}{C LABEL} + \TEST + \ENDTEST + \ENDTEST +} +\EndIncludeInRelease%{2020-10-01}{\TESTBlockHookOneArg}{Message} + +\IncludeInRelease{0000-00-00}{\whatever}{Message} +\EndIncludeInRelease diff --git a/base/testfiles-lthooks/lthooks-show-2020-10-01.lvt b/base/testfiles-lthooks/lthooks-show-2020-10-01.lvt new file mode 100644 index 000000000..3c3247681 --- /dev/null +++ b/base/testfiles-lthooks/lthooks-show-2020-10-01.lvt @@ -0,0 +1,86 @@ +% This is somehow `lthooks-show.lvt` frozen to the 2020-10-01 release +% before hooks with arguments were introduced. + +\input{regression-test} +\RequirePackage[2020-10-01]{latexrelease} +\TYPE{********* RequirePackage[2020-10-01]{latexrelease}} + +\RequirePackage{./lthooks-show} + +\ExplSyntaxOn +\debug_on:n { check-declarations , deprecation } +\ExplSyntaxOff + +\documentclass{article} + +% There are many different hook profiles. + +\START + +\TESTBlockHookEnv + {Undefined environment envA} + {envA} +\NewDocumentEnvironment + {envA}{} + {\TYPE{}} + {\TYPE{}} +\begin{envA}\TYPE{}\end{envA} + +\NewDocumentEnvironment + {envB}{} + {\TYPE{}} + {\TYPE{}} +\TESTBlockHookEnv + {Defined environment envB} + {envB} +\begin{envB}\TYPE{}\end{envB} + +\TESTBlockHookCmd + {Undefined command with no arguments} + {cmdA} +\NewDocumentCommand\cmdA{}{\TYPE{}} +\cmdA + +\NewDocumentCommand\cmdB{}{\TYPE{}} +\TESTBlockHookCmd + {Defined command with no arguments} + {cmdB} +\cmdB + +\TESTBlockHookCustomGeneric + {CUSTOM GENERIC HOOK} + {CUSTOM GENERIC HOOK} + +\TESTBlockHook + {OTHER HOOK: Undeclared} + {UNDECLARED HOOK} + +\NewHook{DECLARED HOOK} + +\TESTBlockHook + {OTHER HOOK: declared} + {DECLARED HOOK} + +\NewReversedHook{DECLARED REVERSED} + +\TESTBlockHook + {OTHER HOOK: declared reversed} + {DECLARED REVERSED} + +\OMIT +\begin{document} +\TIMO + +\BEGINTEST{After \begin{document}} + + \BEGINTEST{Commands} + \cmdA + \SEPARATOR + \cmdB + \ENDTEST + +\ENDTEST + +\TYPE{!!!! If this test changes the documentation needs updating !!!!} + +\END diff --git a/base/testfiles-lthooks/lthooks-show-2020-10-01.tlg b/base/testfiles-lthooks/lthooks-show-2020-10-01.tlg new file mode 100644 index 000000000..2119e09a4 --- /dev/null +++ b/base/testfiles-lthooks/lthooks-show-2020-10-01.tlg @@ -0,0 +1,845 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +============================================================ +TEST 1: Environment: envA +============================================================ +-> The generic hook 'env/envA/before': +> The hook is not declared. +> The hook is empty. + } +l. ... {envA} +-> The generic hook 'env/envA/begin': +> The hook is not declared. +> The hook is empty. + } +l. ... {envA} +-> The generic hook 'env/envA/end': +> The hook is not declared. +> The hook is empty. + } +l. ... {envA} +-> The generic hook 'env/envA/after': +> The hook is not declared. +> The hook is empty. + } +l. ... {envA} +-> The generic hook 'env/envA/before': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envA} +-> The generic hook 'env/envA/begin': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envA} +-> The generic hook 'env/envA/end': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envA} +-> The generic hook 'env/envA/after': +> Code chunks: +> --- +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> ---. + } +l. ... {envA} +============================================================ + + + + + + + +============================================================ +TEST 2: Environment: envB +============================================================ +-> The generic hook 'env/envB/before': +> The hook is not declared. +> The hook is empty. + } +l. ... {envB} +-> The generic hook 'env/envB/begin': +> The hook is not declared. +> The hook is empty. + } +l. ... {envB} +-> The generic hook 'env/envB/end': +> The hook is not declared. +> The hook is empty. + } +l. ... {envB} +-> The generic hook 'env/envB/after': +> The hook is not declared. +> The hook is empty. + } +l. ... {envB} +-> The generic hook 'env/envB/before': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envB} +-> The generic hook 'env/envB/begin': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envB} +-> The generic hook 'env/envB/end': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {envB} +-> The generic hook 'env/envB/after': +> Code chunks: +> --- +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> ---. + } +l. ... {envB} +============================================================ + + + + + + + +============================================================ +TEST 3: Command: Undefined command with no arguments +============================================================ +-> The generic hook 'cmd/cmdA/before': +> The hook is not declared. +> The hook is empty. + } +l. ... {cmdA} +-> The generic hook 'cmd/cmdA/after': +> The hook is not declared. +> The hook is empty. + } +l. ... {cmdA} +-> The generic hook 'cmd/cmdA/before': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {cmdA} +-> The generic hook 'cmd/cmdA/after': +> Code chunks: +> --- +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> ---. + } +l. ... {cmdA} +============================================================ + +============================================================ +TEST 4: Command: Defined command with no arguments +============================================================ +-> The generic hook 'cmd/cmdB/before': +> The hook is not declared. +> The hook is empty. + } +l. ... {cmdB} +-> The generic hook 'cmd/cmdB/after': +> The hook is not declared. +> The hook is empty. + } +l. ... {cmdB} +-> The generic hook 'cmd/cmdB/before': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {cmdB} +-> The generic hook 'cmd/cmdB/after': +> Code chunks: +> --- +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> ---. + } +l. ... {cmdB} +============================================================ + +============================================================ +TEST 5: Custom generic hook: CUSTOM GENERIC HOOK +============================================================ +============================================================ +TEST 6: Raw: CUSTOM GENERIC HOOK +============================================================ +-> The hook 'CUSTOM GENERIC HOOK': +> The hook is not declared. +> Code chunks: +> LABEL -> \TYPE {} +> Document-level (top-level) code: +> --- +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {CUSTOM GENERIC HOOK} +============================================================ +============================================================ +TEST 7: Activated: CUSTOM GENERIC HOOK +============================================================ +-> The hook 'CUSTOM GENERIC HOOK': +> The hook is not declared. +> Code chunks: +> LABEL -> \TYPE {} +> Document-level (top-level) code: +> --- +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {CUSTOM GENERIC HOOK} +============================================================ +============================================================ +TEST 8: Disabled: CUSTOM GENERIC HOOK +============================================================ +-> The hook 'CUSTOM GENERIC HOOK': +> The hook is not declared. +> Code chunks: +> LABEL -> \TYPE {} +> Document-level (top-level) code: +> --- +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {CUSTOM GENERIC HOOK} +============================================================ +============================================================ +============================================================ +TEST 9: OTHER HOOK: Undeclared +============================================================ +============================================================ +TEST 10: Undeclared UNDECLARED HOOK +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> The hook is empty. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 11: UNDECLARED HOOK + TOP LEVEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> --- +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 12: UNDECLARED HOOK + A LABEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 13: UNDECLARED HOOK + B LABEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 14: UNDECLARED HOOK + C LABEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 15: UNDECLARED HOOK + NEXT +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> --- +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 16: UNDECLARED HOOK + C LABEL < A LABEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> C LABEL|A LABEL with relation < +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +TEST 17: UNDECLARED HOOK + DEFAULT: B LABEL > C LABEL +============================================================ +-> The hook 'UNDECLARED HOOK': +> The hook is not declared. +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code: +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> C LABEL|A LABEL with relation < +> C LABEL|B LABEL with default relation < +> Execution order: +> Not set because the hook is undeclared. + } +l. ... {UNDECLARED HOOK} +============================================================ +============================================================ +============================================================ +TEST 18: OTHER HOOK: declared +============================================================ +============================================================ +TEST 19: Undeclared DECLARED HOOK +============================================================ +-> The hook 'DECLARED HOOK': +> The hook is empty. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 20: DECLARED HOOK + TOP LEVEL +============================================================ + +-> The hook 'DECLARED HOOK': +> Code chunks: +> --- +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> ---. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 21: DECLARED HOOK + A LABEL +============================================================ + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> A LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 22: DECLARED HOOK + B LABEL +============================================================ + + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order: +> A LABEL, B LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 23: DECLARED HOOK + C LABEL +============================================================ + + + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after applying rules): +> A LABEL, C LABEL, B LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 24: DECLARED HOOK + NEXT +============================================================ +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after applying rules): +> A LABEL, C LABEL, B LABEL. + } +l. ... {DECLARED HOOK} + + + + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after applying rules): +> A LABEL, C LABEL, B LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 25: DECLARED HOOK + C LABEL < A LABEL +============================================================ + + + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|A LABEL with relation < +> C LABEL|B LABEL with default relation < +> Execution order (after applying rules): +> C LABEL, A LABEL, B LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +TEST 26: DECLARED HOOK + DEFAULT: B LABEL > C LABEL +============================================================ + + + + +-> The hook 'DECLARED HOOK': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed last): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|A LABEL with relation < +> C LABEL|B LABEL with default relation < +> Execution order (after applying rules): +> C LABEL, A LABEL, B LABEL. + } +l. ... {DECLARED HOOK} +============================================================ +============================================================ +============================================================ +TEST 27: OTHER HOOK: declared reversed +============================================================ +============================================================ +TEST 28: Undeclared DECLARED REVERSED +============================================================ +-> The hook 'DECLARED REVERSED': +> The hook is empty. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 29: DECLARED REVERSED + TOP LEVEL +============================================================ + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> --- +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> ---. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 30: DECLARED REVERSED + A LABEL +============================================================ + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 31: DECLARED REVERSED + B LABEL +============================================================ + + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> --- +> Execution order (after reversal): +> B LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 32: DECLARED REVERSED + C LABEL +============================================================ + + + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after reversal and applying rules): +> B LABEL, C LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 33: DECLARED REVERSED + NEXT +============================================================ +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> -> \TYPE {} +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after reversal and applying rules): +> B LABEL, C LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} + + + + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|B LABEL with default relation < +> Execution order (after reversal and applying rules): +> B LABEL, C LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 34: DECLARED REVERSED + C LABEL < A LABEL +============================================================ + + + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|A LABEL with relation < +> C LABEL|B LABEL with default relation < +> Execution order (after reversal and applying rules): +> B LABEL, C LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +TEST 35: DECLARED REVERSED + DEFAULT: B LABEL > C LABEL +============================================================ + + + + +-> The hook 'DECLARED REVERSED': +> Code chunks: +> A LABEL -> \TYPE {} +> B LABEL -> \TYPE {} +> C LABEL -> \TYPE {} +> Document-level (top-level) code (executed first): +> -> \TYPE {} +> Extra code for next invocation: +> --- +> Rules: +> C LABEL|A LABEL with relation < +> C LABEL|B LABEL with default relation < +> Execution order (after reversal and applying rules): +> B LABEL, C LABEL, A LABEL. + } +l. ... {DECLARED REVERSED} +============================================================ +============================================================ +============================================================ +TEST 36: After \begin {document} +============================================================ +============================================================ +TEST 37: Commands +============================================================ + +============================================================ + +============================================================ +============================================================ +!!!! If this test changes the documentation needs updating !!!! diff --git a/base/update-lthooks-tests.sh b/base/update-lthooks-tests.sh index 6371bc956..ebbb0fb59 100755 --- a/base/update-lthooks-tests.sh +++ b/base/update-lthooks-tests.sh @@ -95,6 +95,7 @@ l3build save -cconfig-lthooks \ lthooks-legacy \ lthooks-doc-examples \ lthooks-rollback-args \ + lthooks-show-2020-10-01 \ shipout-000 \ shipout-002 \ shipout-004 \