typst/tests/typ/utility/basics.typ
Laurenz 1ee1d078e2 Fatal errors
- 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
2021-07-30 18:49:19 +02:00

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)