diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-18 10:50:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-18 10:50:08 +0200 |
| commit | 6967c6c80a44186a9aa6ae695cf5caf61d3901fd (patch) | |
| tree | 14c98ffe740fdddf15af7201b2357ab7b2d82360 /tests | |
| parent | 2e87808cdd986dfd91dbbc63fddf74c5b19b2afe (diff) | |
Len function for strings, arrays and dictionaries
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/utility/basics.typ | 16 | ||||
| -rw-r--r-- | tests/typ/utility/math.typ (renamed from tests/typ/utility/calc.typ) | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/typ/utility/basics.typ b/tests/typ/utility/basics.typ new file mode 100644 index 00000000..75e06413 --- /dev/null +++ b/tests/typ/utility/basics.typ @@ -0,0 +1,16 @@ +// 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) diff --git a/tests/typ/utility/calc.typ b/tests/typ/utility/math.typ index 3bfc9802..db234d9c 100644 --- a/tests/typ/utility/calc.typ +++ b/tests/typ/utility/math.typ @@ -1,4 +1,4 @@ -// Test basic calculation functions. +// Test math functions. // Ref: false --- |
