typst/tests/typ/func-font-error.typ
Laurenz ba3d43f7b2 Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace
- "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
2020-12-27 20:45:20 +01:00

18 lines
500 B
XML

// Test error cases of the `font` function.
// Not one of the valid things for positional arguments.
[font false]
// Wrong types.
[font style: bold, weight: "thin", serif: 0]
// Non-existing argument.
[font something: "invalid"]
// compare-ref: false
// error: 4:7-4:12 unexpected argument
// error: 7:14-7:18 invalid font style
// error: 7:28-7:34 expected font weight, found string
// error: 7:43-7:44 expected family or list of families, found integer
// error: 10:7-10:27 unexpected argument