mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant
18 lines
301 B
XML
18 lines
301 B
XML
// Test basic functions.
|
|
// Ref: false
|
|
|
|
---
|
|
// Test the `len` function.
|
|
#test(len(()), 0)
|
|
#test(len(("A", "B", "C")), 3)
|
|
#test(len("Hello World!"), 12)
|
|
#test(len((a: 1, b: 2)), 2)
|
|
|
|
---
|
|
// Error: 6 missing argument: collection
|
|
#len()
|
|
|
|
---
|
|
// Error: 6-10 expected string, array or dictionary
|
|
#len(12pt)
|