summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/array.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/compiler/array.typ')
-rw-r--r--tests/typ/compiler/array.typ13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/typ/compiler/array.typ b/tests/typ/compiler/array.typ
index 92d926a0..12c3c3a0 100644
--- a/tests/typ/compiler/array.typ
+++ b/tests/typ/compiler/array.typ
@@ -64,6 +64,19 @@
#test((1, 2, 3).at(3, default: 5), 5)
---
+// Test remove with default value.
+
+#{
+ let array = (1, 2, 3)
+ test(array.remove(2, default: 5), 3)
+}
+
+#{
+ let array = (1, 2, 3)
+ test(array.remove(3, default: 5), 5)
+}
+
+---
// Test bad lvalue.
// Error: 2:3-2:14 cannot mutate a temporary value
#let array = (1, 2, 3)