[latex3-commits] [git/LaTeX3-latex3-latex2e] shared_callback: Add tests (2f159eaa)

Marcel Fabian Krüger tex at 2krueger.de
Mon May 16 22:55:44 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : shared_callback
Link       : https://github.com/latex3/latex2e/commit/2f159eaaa2a4b7f37543f67550859da0faaea2b0

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

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

    Add tests


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

2f159eaaa2a4b7f37543f67550859da0faaea2b0
 ...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
 6 files changed, 58 insertions(+)

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.