[latex3-commits] [git/LaTeX3-latex3-latex2e] gh606: Test (lack of) space trimming in \UseHook and \UseOneTimeHook (1b896f5a)

PhelypeOleinik phelype.oleinik at latex-project.org
Thu Sep 2 17:42:45 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh606
Link       : https://github.com/latex3/latex2e/commit/1b896f5a9ef3e498c908f094bdd2e8ae37707df8

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

commit 1b896f5a9ef3e498c908f094bdd2e8ae37707df8
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Sep 2 12:42:45 2021 -0300

    Test (lack of) space trimming in \UseHook and \UseOneTimeHook


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

1b896f5a9ef3e498c908f094bdd2e8ae37707df8
 base/testfiles-lthooks/lthooks-030.lvt | 36 ++++++++++++++++++++++++++++++++++
 base/testfiles-lthooks/lthooks-030.tlg | 25 +++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/base/testfiles-lthooks/lthooks-030.lvt b/base/testfiles-lthooks/lthooks-030.lvt
new file mode 100644
index 00000000..06c8dcaf
--- /dev/null
+++ b/base/testfiles-lthooks/lthooks-030.lvt
@@ -0,0 +1,36 @@
+
+\RequirePackage[enable-debug]{expl3}
+\ExplSyntaxOn
+\debug_on:n { check-declarations , deprecation }
+\ExplSyntaxOff
+
+\input{regression-test}
+
+\START
+
+\begingroup
+  \lccode`\?=`\ %
+  \lowercase{\endgroup
+\NewHook{?space?}
+\AddToHook{?space?}[x]%
+  {\typeout{I have spaces in my name.}}%
+
+\ShowHook{?space?}
+}
+
+\ShowHook{ space }
+
+\typeout{Using " space "}
+\UseHook{ space }
+
+\typeout{Using one-time " space "}
+\UseOneTimeHook{ space }
+
+\begingroup
+  \lccode`\?=`\ %
+  \lowercase{\endgroup
+\AddToHook{?space?}[x]%
+  {\typeout{It's me again.}}%
+}
+
+\END
diff --git a/base/testfiles-lthooks/lthooks-030.tlg b/base/testfiles-lthooks/lthooks-030.tlg
new file mode 100644
index 00000000..ef54b4a2
--- /dev/null
+++ b/base/testfiles-lthooks/lthooks-030.tlg
@@ -0,0 +1,25 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+-> The hook ' space ':
+> Code chunks:
+>     x -> \typeout {i have spaces in my name.}
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     x.
+<recently read> }
+l. ...}
+-> The hook 'space':
+> The hook is not declared.
+> The hook is empty.
+<recently read> }
+l. ...\ShowHook{ space }
+Using " space "
+i have spaces in my name.
+Using one-time " space "
+i have spaces in my name.
+it's me again.





More information about the latex3-commits mailing list.