summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/layout/spacing.pngbin2705 -> 3306 bytes
-rw-r--r--tests/ref/text/bidi.pngbin24575 -> 25815 bytes
-rw-r--r--tests/ref/text/repeat.pngbin6637 -> 9342 bytes
-rw-r--r--tests/typ/layout/spacing.typ9
-rw-r--r--tests/typ/text/bidi.typ4
-rw-r--r--tests/typ/text/repeat.typ24
6 files changed, 36 insertions, 1 deletions
diff --git a/tests/ref/layout/spacing.png b/tests/ref/layout/spacing.png
index 7bb74ad9..6fe539f0 100644
--- a/tests/ref/layout/spacing.png
+++ b/tests/ref/layout/spacing.png
Binary files differ
diff --git a/tests/ref/text/bidi.png b/tests/ref/text/bidi.png
index 68bd6b73..f31bdf0a 100644
--- a/tests/ref/text/bidi.png
+++ b/tests/ref/text/bidi.png
Binary files differ
diff --git a/tests/ref/text/repeat.png b/tests/ref/text/repeat.png
index 898de96f..d7786bef 100644
--- a/tests/ref/text/repeat.png
+++ b/tests/ref/text/repeat.png
Binary files differ
diff --git a/tests/typ/layout/spacing.typ b/tests/typ/layout/spacing.typ
index 82531efc..378c11b8 100644
--- a/tests/typ/layout/spacing.typ
+++ b/tests/typ/layout/spacing.typ
@@ -21,7 +21,14 @@ Add #h(10pt) #h(10pt) up
// Test spacing collapsing before spacing.
#set par(align: right)
A #h(0pt) B #h(0pt) \
-A B
+A B \
+A #h(-1fr) B
+
+---
+// Test RTL spacing.
+#set text(dir: rtl)
+A #h(10pt) B \
+A #h(1fr) B
---
// Missing spacing.
diff --git a/tests/typ/text/bidi.typ b/tests/typ/text/bidi.typ
index a180ad55..7058638a 100644
--- a/tests/typ/text/bidi.typ
+++ b/tests/typ/text/bidi.typ
@@ -46,6 +46,10 @@ Lריווח #h(1cm) R
קרנפיםRh#image("../../res/rhino.png", height: 11pt)inoחיים
---
+// Test whether L1 whitespace resetting destroys stuff.
+الغالب #h(70pt) ن{" "}ة
+
+---
// Test setting a vertical direction.
// Ref: false
diff --git a/tests/typ/text/repeat.typ b/tests/typ/text/repeat.typ
index 0036999a..13e99b51 100644
--- a/tests/typ/text/repeat.typ
+++ b/tests/typ/text/repeat.typ
@@ -1,6 +1,7 @@
// Test the `repeat` function.
---
+// Test multiple repeats.
#let sections = (
("Introduction", 1),
("Approach", 1),
@@ -13,3 +14,26 @@
#for section in sections [
#section(0) #repeat[.] #section(1) \
]
+
+---
+// Test dots with RTL.
+#set text(lang: "ar")
+مقدمة #repeat[.] 15
+
+---
+// Test empty repeat.
+A #repeat[] B
+
+---
+// Test spaceless repeat.
+A#repeat(rect(width: 2.5em, height: 1em))B
+
+---
+// Test single repeat in both directions.
+A#repeat(rect(width: 6em, height: 0.7em))B
+
+#set par(align: center)
+A#repeat(rect(width: 6em, height: 0.7em))B
+
+#set text(dir: rtl)
+ريجين#repeat(rect(width: 4em, height: 0.7em))سون