summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-27 11:58:17 +0200
committerLaurenz <laurmaedje@gmail.com>2023-03-27 12:12:57 +0200
commita5c88c19b300c64fafd6a19e3f5f2fe6422a7b67 (patch)
tree42192332e277624a35c6e3db568c0ff8196b582a /tests
parent10d8fd966130f1e60d328b08a7fcce61961d6974 (diff)
Fix enum parsing and allow zero in numberings
Fixes #353.
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/enum.pngbin8727 -> 11276 bytes
-rw-r--r--tests/ref/meta/numbering.pngbin7479 -> 8235 bytes
-rw-r--r--tests/typ/layout/enum.typ12
-rw-r--r--tests/typ/meta/numbering.typ8
4 files changed, 12 insertions, 8 deletions
diff --git a/tests/ref/layout/enum.png b/tests/ref/layout/enum.png
index d80a584c..a52ad989 100644
--- a/tests/ref/layout/enum.png
+++ b/tests/ref/layout/enum.png
Binary files differ
diff --git a/tests/ref/meta/numbering.png b/tests/ref/meta/numbering.png
index 93b9f394..036889e3 100644
--- a/tests/ref/meta/numbering.png
+++ b/tests/ref/meta/numbering.png
Binary files differ
diff --git a/tests/typ/layout/enum.typ b/tests/typ/layout/enum.typ
index 9512e1b5..341afed4 100644
--- a/tests/typ/layout/enum.typ
+++ b/tests/typ/layout/enum.typ
@@ -4,6 +4,7 @@
#enum[Embrace][Extend][Extinguish]
---
+0. Before first!
1. First.
2. Indented
@@ -22,7 +23,14 @@
/ Term: List
---
+// In the line.
+1.2 \
+This is 0. \
+See 0.3. \
+
+---
// Edge cases.
+
-Empty
-+Nope
+Empty \
++Nope \
+a + 0.
diff --git a/tests/typ/meta/numbering.typ b/tests/typ/meta/numbering.typ
index 63e45362..ecc3bdbf 100644
--- a/tests/typ/meta/numbering.typ
+++ b/tests/typ/meta/numbering.typ
@@ -1,7 +1,7 @@
// Test integrated numbering patterns.
---
-#for i in range(1, 9) {
+#for i in range(0, 9) {
numbering("*", i)
[ and ]
numbering("I.a", i, i)
@@ -10,9 +10,5 @@
}
---
-// Error: 17-18 number must be positive
-#numbering("1", 0)
-
----
-// Error: 17-19 number must be positive
+// Error: 17-19 number must be at least zero
#numbering("1", -1)