mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
- Identifiers are now evaluated as variables instead of being plain values - Constants like `left` or `bold` are stored as dynamic values containing the respective rust types - We now distinguish between arrays and dictionaries to make things more intuitive (at the cost of a bit more complex parsing) - Spans were removed from collections (arrays, dictionaries), function arguments still have spans for the top-level values to enable good diagnostics
22 lines
628 B
XML
22 lines
628 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]
|
|
|
|
// Weight out of range.
|
|
[font weight: 2700]
|
|
|
|
// Non-existing argument.
|
|
[font something: "invalid"]
|
|
|
|
// compare-ref: false
|
|
// error: 4:7-4:12 unexpected argument
|
|
// error: 7:14-7:18 expected font style, found font weight
|
|
// error: 7:28-7:34 expected font weight, found string
|
|
// error: 7:43-7:44 expected font family or array of font families, found integer
|
|
// warning: 10:15-10:19 must be between 100 and 900
|
|
// error: 13:7-13:27 unexpected argument
|