summaryrefslogtreecommitdiff
path: root/tests/typ/code/ops.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/code/ops.typ')
-rw-r--r--tests/typ/code/ops.typ12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ
index a7d5474e..6d788df1 100644
--- a/tests/typ/code/ops.typ
+++ b/tests/typ/code/ops.typ
@@ -147,6 +147,18 @@
{ x += "thing" } #test(x, "something")
---
+// Test range operator.
+
+#let array = (1, 2, 3)
+#test(1..3, array)
+#test(1.. 3, array)
+#test(1 ..3, array)
+#test(1 .. 3, array)
+
+#test(-4..2, (-4, -3, -2, -1, 0, 1, 2))
+#test(10..5, ())
+
+---
// Test with operator.
// Ref: true