[latex3-commits] [git/LaTeX3-latex3-latex2e] shared_callback: Add tests (531f2367)

Marcel Fabian Krüger tex at 2krueger.de
Sat Aug 13 14:39:14 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : shared_callback
Link       : https://github.com/latex3/latex2e/commit/531f23671885cbb05f1259f93759b96e9242f2af

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

commit 531f23671885cbb05f1259f93759b96e9242f2af
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon May 16 22:55:44 2022 +0200

    Add tests


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

531f23671885cbb05f1259f93759b96e9242f2af
 base/testfiles/tlb-ltluatex-001.luatex.tlg         |  2 +-
 ...luatex.tlg => tlb-mathcallbacks-001.luatex.tlg} |  0
 ...mathcallbacks.lvt => tlb-mathcallbacks-001.lvt} |  1 +
 ...mathcallbacks.tlg => tlb-mathcallbacks-001.tlg} |  0
 base/testfiles/tlb-mathcallbacks-002.luatex.tlg    | 26 ++++++++++++++++++
 base/testfiles/tlb-mathcallbacks-002.lvt           | 31 ++++++++++++++++++++++
 ...b-0060.luatex.tlg => tlb-mathcallbacks-002.tlg} |  0
 7 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/base/testfiles/tlb-ltluatex-001.luatex.tlg b/base/testfiles/tlb-ltluatex-001.luatex.tlg
index 53c7483d..719637d9 100644
--- a/base/testfiles/tlb-ltluatex-001.luatex.tlg
+++ b/base/testfiles/tlb-ltluatex-001.luatex.tlg
@@ -7,7 +7,7 @@ stack traceback:
 ^^I[C]: in function 'error'
 ^^I./ltluatex.lua:110: in upvalue 'module_error'
 ^^I./ltluatex.lua:117: in upvalue 'luatexbase_error'
-^^I./ltluatex.lua:428: in field 'create_callback'
+^^I./ltluatex.lua:430: in field 'create_callback'
 ^^I[\directlua]:1: in main chunk.
 l. ...}
 The lua interpreter ran into a problem, so the
diff --git a/base/testfiles/tlb-mathcallbacks.luatex.tlg b/base/testfiles/tlb-mathcallbacks-001.luatex.tlg
similarity index 100%
rename from base/testfiles/tlb-mathcallbacks.luatex.tlg
rename to base/testfiles/tlb-mathcallbacks-001.luatex.tlg
diff --git a/base/testfiles/tlb-mathcallbacks.lvt b/base/testfiles/tlb-mathcallbacks-001.lvt
similarity index 96%
rename from base/testfiles/tlb-mathcallbacks.lvt
rename to base/testfiles/tlb-mathcallbacks-001.lvt
index 7c231d4b..0bb92469 100644
--- a/base/testfiles/tlb-mathcallbacks.lvt
+++ b/base/testfiles/tlb-mathcallbacks-001.lvt
@@ -1,4 +1,5 @@
 \input{test2e}
+\documentclass{minimal}
 \begin{document}
 \START
 \ifx\directlua\undefined\END\expandafter\stop\fi
diff --git a/base/testfiles/tlb-mathcallbacks.tlg b/base/testfiles/tlb-mathcallbacks-001.tlg
similarity index 100%
rename from base/testfiles/tlb-mathcallbacks.tlg
rename to base/testfiles/tlb-mathcallbacks-001.tlg
diff --git a/base/testfiles/tlb-mathcallbacks-002.luatex.tlg b/base/testfiles/tlb-mathcallbacks-002.luatex.tlg
new file mode 100644
index 00000000..d4cf21ba
--- /dev/null
+++ b/base/testfiles/tlb-mathcallbacks-002.luatex.tlg
@@ -0,0 +1,26 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Removing  `l3build.shift' from `post_mlist_to_hlist_filter'.
+false
+Inserting `filter' at position 1 in `pre_mlist_to_hlist_filter'.
+true
+Removing  `filter' from `pre_mlist_to_hlist_filter'.
+false
+Inserting `filter' at position 1 in `pre_mlist_to_hlist_filter'.
+Inserting `filter' at position 1 in `post_mlist_to_hlist_filter'.
+true
+Removing  `filter' from `pre_mlist_to_hlist_filter'.
+true
+Removing  `filter' from `post_mlist_to_hlist_filter'.
+false
+Inserting `filter' at position 1 in `mlist_to_hlist'.
+true
+Removing  `filter' from `mlist_to_hlist'.
+false
+Inserting `filter' at position 1 in `mlist_to_hlist'.
+Inserting `filter' at position 1 in `post_mlist_to_hlist_filter'.
+true
+Removing  `filter' from `mlist_to_hlist'.
+true
+Removing  `filter' from `post_mlist_to_hlist_filter'.
+false
diff --git a/base/testfiles/tlb-mathcallbacks-002.lvt b/base/testfiles/tlb-mathcallbacks-002.lvt
new file mode 100644
index 00000000..5d139f3d
--- /dev/null
+++ b/base/testfiles/tlb-mathcallbacks-002.lvt
@@ -0,0 +1,31 @@
+\input{test2e}
+\documentclass{minimal}
+\begin{document}
+\START
+\ifx\directlua\undefined\END\expandafter\stop\fi
+\directlua{luatexbase.remove_from_callback('post_mlist_to_hlist_filter', 'l3build.shift')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.add_to_callback('pre_mlist_to_hlist_filter', function(...) print(...) return true end, 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('pre_mlist_to_hlist_filter', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.add_to_callback('pre_mlist_to_hlist_filter', function(...) print(...) return true end, 'filter')}
+\directlua{luatexbase.add_to_callback('post_mlist_to_hlist_filter', function(...) print(...) return true end, 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('pre_mlist_to_hlist_filter', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('post_mlist_to_hlist_filter', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.add_to_callback('mlist_to_hlist', function(...) print(...) return true end, 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('mlist_to_hlist', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.add_to_callback('mlist_to_hlist', function(...) print(...) return true end, 'filter')}
+\directlua{luatexbase.add_to_callback('post_mlist_to_hlist_filter', function(...) print(...) return true end, 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('mlist_to_hlist', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\directlua{luatexbase.remove_from_callback('post_mlist_to_hlist_filter', 'filter')}
+\directlua{texio.write_nl(tostring(callback.list().mlist_to_hlist))}
+\END
+\end{document}
diff --git a/base/testfiles/github-0060.luatex.tlg b/base/testfiles/tlb-mathcallbacks-002.tlg
similarity index 100%
copy from base/testfiles/github-0060.luatex.tlg
copy to base/testfiles/tlb-mathcallbacks-002.tlg





More information about the latex3-commits mailing list.