Files
typst-collection/glossy/tests/group-specified/test.typ
T
swaits 0a87404a18 feat(glossy): add type-checking
- adds type-checking via the valkyrie package
- fixes handling of groups parameter on #glossary()
- new test for relevant changes
2024-12-16 18:30:09 -07:00

34 lines
1.0 KiB
Typst

#import "/lib.typ": *
#show: init-glossary.with(json("abbreviations.json"))
Reference: @pbr, @zbuffer
#let t(g) = [
#line(length: 100%)
*TESTING:* `#glossary(groups: ` #repr(g) `)`
#glossary(groups: g)
]
#t("abbreviations") // "string" : str
#t(("abbreviations")) // ("string") : str
#t(("abbreviations",)) // ("string",) : array(str)
#t(("abbreviations","abbreviations")) // ("string","string",) : array(str)
#pagebreak(weak: true)
#t("") // empty string should be the empty group
#t(("")) // empty string should be the empty group
#t(("",)) // empty string should be the empty group
#t(("","")) // empty string should be the empty group
#pagebreak(weak: true)
#t(none) // none should be all groups
#t((none)) // none should be all groups
#pagebreak(weak: true)
#t(("abbreviations",none)) // try to get both groups