[latex3-commits] [git/LaTeX3-latex3-latex2e] newluacmd: Add test (4f657d5b)

Marcel Fabian Krüger tex at 2krueger.de
Mon Dec 27 06:37:40 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : newluacmd
Link       : https://github.com/latex3/latex2e/commit/4f657d5b16513dc4bfcccb96266c4cd07d236166

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

commit 4f657d5b16513dc4bfcccb96266c4cd07d236166
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Nov 15 14:22:26 2021 +0100

    Add test


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

4f657d5b16513dc4bfcccb96266c4cd07d236166
 base/testfiles/tlb-luacmd-001.luatex.tlg            |  9 +++++++++
 base/testfiles/tlb-luacmd-001.lvt                   | 21 +++++++++++++++++++++
 .../{github-0060.luatex.tlg => tlb-luacmd-001.tlg}  |  1 +
 3 files changed, 31 insertions(+)

diff --git a/base/testfiles/tlb-luacmd-001.luatex.tlg b/base/testfiles/tlb-luacmd-001.luatex.tlg
new file mode 100644
index 00000000..dc650c5a
--- /dev/null
+++ b/base/testfiles/tlb-luacmd-001.luatex.tlg
@@ -0,0 +1,9 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+ LuaTeX ltcmd test
+\myexpluacmd=\luafunction...
+\myluacmd=\luafunction...
+myexpluacmd
+\myluacmd 
+myexpluacmd
+myluacmd
diff --git a/base/testfiles/tlb-luacmd-001.lvt b/base/testfiles/tlb-luacmd-001.lvt
new file mode 100644
index 00000000..be7e376f
--- /dev/null
+++ b/base/testfiles/tlb-luacmd-001.lvt
@@ -0,0 +1,21 @@
+\input{test2e}
+\START
+\typeout{^^J LuaTeX ltcmd test^^J}
+\ifx\directlua\undefined
+\END
+\fi
+
+\newluacmd\myexpluacmd
+\newprotectedluacmd\myluacmd
+\directlua{
+  lua.get_functions_table()[\the\allocationnumber] = function()
+    texio.write_nl'myluacmd'
+  end
+  lua.get_functions_table()[token.create'myexpluacmd'.index] = function()
+    texio.write_nl'myexpluacmd'
+  end
+}
+\typeout{\myluacmd\myexpluacmd}
+\myexpluacmd\myluacmd
+
+\END
diff --git a/base/testfiles/github-0060.luatex.tlg b/base/testfiles/tlb-luacmd-001.tlg
similarity index 83%
copy from base/testfiles/github-0060.luatex.tlg
copy to base/testfiles/tlb-luacmd-001.tlg
index 1d0c6975..1d58cd57 100644
--- a/base/testfiles/github-0060.luatex.tlg
+++ b/base/testfiles/tlb-luacmd-001.tlg
@@ -1,2 +1,3 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+ LuaTeX ltcmd test





More information about the latex3-commits mailing list.