diff --git a/base/testfiles-lttemplates/lttemplates005.lvt b/base/testfiles-lttemplates/lttemplates005.lvt index ee85f8a95..88c0e2522 100644 --- a/base/testfiles-lttemplates/lttemplates005.lvt +++ b/base/testfiles-lttemplates/lttemplates005.lvt @@ -99,4 +99,78 @@ \UseInstance { test } { runaway } } +\OMIT + + \dim_new:N \dimcode + \fp_new:N \fpcode + \int_new:N \intcode + \muskip_new:N \muskipcode + \skip_new:N \skipcode + \tl_new:N \tlcode + \DeclareTemplateInterface { test } { std4 } { 0 } + { + dim.code : length , + code.dim : length = \KeyValue { dim.code } , + fp.code : real , + code.fp : real = \KeyValue { fp.code } , + int.code : integer , + code.int : integer = \KeyValue { int.code } , + muskip.code : muskip , + code.muskip : muskip = \KeyValue { muskip.code } , + skip.code : skip , + code.skip : skip = \KeyValue { skip.code } , + tokenlist.code : tokenlist , + code.tokenlist : tokenlist = \KeyValue { tokenlist.code } + } + \DeclareTemplateCode { test } { std4 } { 0 } + { + dim.code = \dimcode , + code.dim = \dimcode , + fp.code = \fpcode , + code.fp = \fpcode , + int.code = \intcode , + code.int = \intcode , + muskip.code = \muskipcode , + code.muskip = \muskipcode , + skip.code = \skipcode , + code.skip = \skipcode , + tokenlist.code = \tlcode , + code.tokenlist = \tlcode + } + { + \AssignTemplateKeys + ( \dimeval { \dimcode } ) + ( \fpeval { \fpcode } ) + ( \inteval { \intcode } ) + ( \the \muexpr \muskipcode \relax ) + ( \the \glueexpr \skipcode \relax ) + ( \tlcode ) + } + +\TIMO + +\TEST { Key-value~passing } + { + \DeclareInstance{ test } { i1 } { std4 } + { + dim.code = 1pt , + fp.code = 1 , + int.code = 1 , + muskip.code = 1mu , + skip.code = 1pt , + tokenlist.code = AAA + } + \DeclareInstance{ test } { i2 } { std4 } + { + code.dim = 1pt , + code.fp = 1 , + code.int = 1 , + code.muskip = 1mu , + code.skip = 1pt , + code.tokenlist = AAA + } + \UseInstance { test } { i1 } + \UseInstance { test } { i2 } + } + \END diff --git a/base/testfiles-lttemplates/lttemplates005.tlg b/base/testfiles-lttemplates/lttemplates005.tlg index 7b5478e4c..0b58b3ef4 100644 --- a/base/testfiles-lttemplates/lttemplates005.tlg +++ b/base/testfiles-lttemplates/lttemplates005.tlg @@ -24,3 +24,7 @@ TEST 3: Key values for booleans true true ============================================================ +============================================================ +TEST 4: Key-value passing +============================================================ +============================================================