diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-29 13:08:16 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-29 13:49:50 +0200 |
| commit | b89cd128ae118571efe8a5a5b40b9365e3007746 (patch) | |
| tree | 5f13a9bab6f83d0a7b055afbaa69c736e53679a7 /tests/typ | |
| parent | 6d0911d7a858ff6a770ca1556e91791fb1838ec1 (diff) | |
Wide calls
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/code/call-wide.typ | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/typ/code/call-wide.typ b/tests/typ/code/call-wide.typ new file mode 100644 index 00000000..2bb6d82e --- /dev/null +++ b/tests/typ/code/call-wide.typ @@ -0,0 +1,47 @@ +// Test wide calls. + +--- +// Test multiple wide calls in separate expressions. +#font!(color: eastern) - First +#font!(color: forest) - Second + +--- +// Test in heading. +# A #align!(right) B +C + +--- +// Test evaluation semantics. +// Ref: false + +#let r +#let x = 1 +#let f(x, body) = (x, body) + +[ + { r = f!(x) } + { x = 2 } +] + +#test(repr(r), "(1, <template>)") + +--- +// Test multiple wide calls in one expression. +// Ref: false + +#let id(x) = x +#let add(x, y) = x + y + +// Error: 11-13 duplicate wide call +[{id!() + id!()}] + +// Test nested wide calls. +// Error: 2-6 duplicate wide call +[#add!(id!())] + +--- +// Test missing parentheses. +// Ref: false + +// Error: 4 expected argument list +#f! |
