diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-04 23:04:19 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-04 23:12:31 +0200 |
| commit | 2a45650dcc87c3bf047adaf030fd392bbe9fbb5e (patch) | |
| tree | c78ce67e341d2ad1e7f6ffb6058906075b76798a /tests/typ/code/field.typ | |
| parent | e674fd7e909c273c36952f01829544a2efc11c92 (diff) | |
Keyed pairs
Diffstat (limited to 'tests/typ/code/field.typ')
| -rw-r--r-- | tests/typ/code/field.typ | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/typ/code/field.typ b/tests/typ/code/field.typ index abccaede..b63a8768 100644 --- a/tests/typ/code/field.typ +++ b/tests/typ/code/field.typ @@ -2,6 +2,7 @@ // Ref: false --- +// Test field on dictionary. #let dict = (nothing: "ness", hello: "world") #test(dict.nothing, "ness") { @@ -12,6 +13,16 @@ } --- +// Test field on node. +#show node: list as { + test(node.items.len(), 3) +} + +- A +- B +- C + +--- // Error: 6-13 dictionary does not contain key "invalid" {(:).invalid} @@ -20,5 +31,10 @@ {false.ok} --- +// Error: 29-32 unknown field "fun" +#show node: heading as node.fun += A + +--- // Error: 8-12 expected identifier, found boolean {false.true} |
