diff options
Diffstat (limited to 'tests/suite')
| -rw-r--r-- | tests/suite/foundations/array.typ | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/suite/foundations/array.typ b/tests/suite/foundations/array.typ index 3992d75e..336c5a67 100644 --- a/tests/suite/foundations/array.typ +++ b/tests/suite/foundations/array.typ @@ -492,3 +492,16 @@ --- array-unclosed --- // Error: 3-4 unclosed delimiter #{(} + +--- array-reduce --- +// Test the `reduce` method. +#test(().reduce(grid), none) +#test((1, 2, 3, 4).reduce((s, x) => s + x), 10) + +--- array-reduce-missing-reducer --- +// Error: 2-13 missing argument: reducer +#().reduce() + +--- array-reduce-unexpected-argument --- +// Error: 19-21 unexpected argument +#(1, 2, 3).reduce(() => none)
\ No newline at end of file |
