[latex3-commits] [git/LaTeX3-latex3-latex3] key-digest: First test for \keys_digest:nnN (eec183846)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Feb 28 13:05:41 CET 2022
Repository : https://github.com/latex3/latex3
On branch : key-digest
Link : https://github.com/latex3/latex3/commit/eec1838466c35bf5987208b27b28512af9356eb0
>---------------------------------------------------------------
commit eec1838466c35bf5987208b27b28512af9356eb0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Feb 28 12:05:41 2022 +0000
First test for \keys_digest:nnN
>---------------------------------------------------------------
eec1838466c35bf5987208b27b28512af9356eb0
l3kernel/testfiles/m3keys008.lvt | 56 ++++++++++++++++++++++++++++++++++++++++
l3kernel/testfiles/m3keys008.tlg | 15 +++++++++++
2 files changed, 71 insertions(+)
diff --git a/l3kernel/testfiles/m3keys008.lvt b/l3kernel/testfiles/m3keys008.lvt
new file mode 100644
index 000000000..6b10296d5
--- /dev/null
+++ b/l3kernel/testfiles/m3keys008.lvt
@@ -0,0 +1,56 @@
+% Copyright (C) 2022 The LaTeX Project
+
+
+\documentclass{minimal}
+\input{regression-test}
+
+\RequirePackage[enable-debug]{expl3}
+\ExplSyntaxOn
+\debug_on:n { check-declarations , deprecation , log-functions }
+\ExplSyntaxOff
+
+
+\begin{document}
+\START
+\AUTHOR{Joseph Wright}
+\ExplSyntaxOn
+
+\TEST { Key~digestion~of~settings }
+ {
+ \OMIT
+ \keys_define:nn { test }
+ {
+ key-one .bool_set_inverse:N = \l_tmpa_bool ,
+ key-two .clist_set:N = \l_tmpa_clist ,
+ key-three .code:n = #1 ,
+ key-four .cs_set:Np = \foo #1#2 ,
+ key-five .dim_set:N = \l_tmpa_dim ,
+ key-six .fp_set:N = \l_tmpa_fp ,
+ key-seven .int_set:N = \l_tmpa_int ,
+ key-eight .muskip_set:N = \l_tmpa_muskip ,
+ key-nine .skip_set:N = \l_tmpa_skip ,
+ key-ten .str_set:N = \l_tmpa_str ,
+ key-eleven .tl_set:N = \l_tmpa_tl ,
+ key-twelve .tl_set_x:N = \l_tmpb_tl
+ }
+ \TIMO
+ \keys_digest:nnN { test }
+ {
+ key-one = true ,
+ key-two = { a , b } ,
+ key-three = foo ,
+ key-four = #1:#2 ,
+ key-five = 0.3pt ,
+ key-six = 2 * 0.3 ,
+ key-seven = 123 ,
+ key-eight = 0.4mu ,
+ key-nine = 0.66pt ,
+ key-ten = foo ,
+ key-eleven = footoo ,
+ key-twelve = \l_tmpa_tl
+ }
+ \l_tmpa_tl
+ \tl_show:N \l_tmpa_tl
+ }
+
+\END
\ No newline at end of file
diff --git a/l3kernel/testfiles/m3keys008.tlg b/l3kernel/testfiles/m3keys008.tlg
new file mode 100644
index 000000000..5b691e730
--- /dev/null
+++ b/l3kernel/testfiles/m3keys008.tlg
@@ -0,0 +1,15 @@
+This is a generated file for the LaTeX (2e + expl3) validation system.
+Don't change this file in any respect.
+Author: Joseph Wright
+============================================================
+TEST 1: Key digestion of settings
+============================================================
+> \l_tmpa_tl=\bool_set_false:N \l_tmpa_bool \clist_set:Nn \l_tmpa_clist
+{a,b}foo\cs_set:Npn \foo ##1##2{##1:##2}\dim_set:Nn \l_tmpa_dim
+{0.3pt}\fp_set:Nn \l_tmpa_fp {2*0.3}\int_set:Nn \l_tmpa_int
+{123}\muskip_set:Nn \l_tmpa_muskip {0.4mu}\skip_set:Nn \l_tmpa_skip
+{0.66pt}\str_set:Nn \l_tmpa_str {foo}\tl_set:Nn \l_tmpa_tl {footoo}\tl_set:Nx
+\l_tmpb_tl {\l_tmpa_tl }.
+<recently read> }
+l. ... }
+============================================================
More information about the latex3-commits
mailing list.