summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-07 21:24:36 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-08 00:20:48 +0100
commite74ae6ce70d4c6ca006613eadf07f920951789e3 (patch)
tree0b9b2ddabf79dad8d55631780ee5d70afe7362d7 /tests
parent0b624390906e911bde325b487b2710b67c8205c8 (diff)
Make all nodes into classes
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/code/repr.pngbin9874 -> 9933 bytes
-rw-r--r--tests/ref/text/par.pngbin8169 -> 9364 bytes
-rw-r--r--tests/typ/layout/columns.typ10
-rw-r--r--tests/typ/layout/shape-circle.typ2
-rw-r--r--tests/typ/layout/shape-fill-stroke.typ2
-rw-r--r--tests/typ/text/par.typ17
6 files changed, 24 insertions, 7 deletions
diff --git a/tests/ref/code/repr.png b/tests/ref/code/repr.png
index 4e5ebb13..e0749e12 100644
--- a/tests/ref/code/repr.png
+++ b/tests/ref/code/repr.png
Binary files differ
diff --git a/tests/ref/text/par.png b/tests/ref/text/par.png
index 03117e67..bb705a19 100644
--- a/tests/ref/text/par.png
+++ b/tests/ref/text/par.png
Binary files differ
diff --git a/tests/typ/layout/columns.typ b/tests/typ/layout/columns.typ
index bf954d93..7868ac39 100644
--- a/tests/typ/layout/columns.typ
+++ b/tests/typ/layout/columns.typ
@@ -2,7 +2,8 @@
---
// Test normal operation and RTL directions.
-#set page(height: 3.25cm, width: 7.05cm, columns: 2, column-gutter: 30pt)
+#set page(height: 3.25cm, width: 7.05cm, columns: 2)
+#set columns(gutter: 30pt)
#set text("Noto Sans Arabic", serif)
#set par(lang: "ar")
@@ -10,7 +11,7 @@
العديد من التفاعلات الكيميائية. (DNA) من أهم الأحماض النووية التي تُشكِّل
إلى جانب كل من البروتينات والليبيدات والسكريات المتعددة
#rect(fill: eastern, height: 8pt, width: 6pt)
-الجزيئات الضخمة الأربعة الضرورية للحياة.
+الجزيئات الضخمة الأربعة الضرورية للحياة.
---
// Test the `columns` function.
@@ -28,7 +29,7 @@
#set page(height: 5cm, width: 7.05cm, columns: 2)
Lorem ipsum dolor sit amet is a common blind text
-and I again am in need of filling up this page
+and I again am in need of filling up this page
#align(bottom, rect(fill: eastern, width: 100%, height: 12pt))
#colbreak()
@@ -49,7 +50,8 @@ a page for a test but it does get the job done.
---
// Test setting a column gutter and more than two columns.
-#set page(height: 3.25cm, width: 7.05cm, columns: 3, column-gutter: 30pt)
+#set page(height: 3.25cm, width: 7.05cm, columns: 3)
+#set columns(gutter: 30pt)
#rect(width: 100%, height: 2.5cm, fill: conifer)
#rect(width: 100%, height: 2cm, fill: eastern)
diff --git a/tests/typ/layout/shape-circle.typ b/tests/typ/layout/shape-circle.typ
index 8b795830..4b978e86 100644
--- a/tests/typ/layout/shape-circle.typ
+++ b/tests/typ/layout/shape-circle.typ
@@ -9,7 +9,7 @@
// Test auto sizing.
Auto-sized circle. \
-#circle(fill: rgb("eb5278"), thickness: 2pt,
+#circle(fill: rgb("eb5278"), stroke: black, thickness: 2pt,
align(center + horizon)[But, soft!]
)
diff --git a/tests/typ/layout/shape-fill-stroke.typ b/tests/typ/layout/shape-fill-stroke.typ
index 3ae5f987..935f3bc7 100644
--- a/tests/typ/layout/shape-fill-stroke.typ
+++ b/tests/typ/layout/shape-fill-stroke.typ
@@ -13,7 +13,7 @@
rect(fill: eastern, stroke: none),
rect(fill: forest, stroke: none, thickness: 2pt),
rect(fill: forest, stroke: conifer),
- rect(fill: forest, thickness: 2pt),
+ rect(fill: forest, stroke: black, thickness: 2pt),
rect(fill: forest, stroke: conifer, thickness: 2pt),
) {
(align(horizon)[{i + 1}.], rect, [])
diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ
index 8bd43deb..96a9eb6e 100644
--- a/tests/typ/text/par.typ
+++ b/tests/typ/text/par.typ
@@ -26,10 +26,25 @@ World
You
---
+// Test that paragraphs break due to incompatibility has correct spacing.
+A #set par(spacing: 0pt); B #parbreak() C
+
+---
+// Test that paragraph breaks due to block nodes have the correct spacing.
+- A
+
+#set par(spacing: 0pt)
+- B
+- C
+#set par(spacing: 5pt)
+- D
+- E
+
+---
// Test that paragraph break due to incompatibility respects
// spacing defined by the two adjacent paragraphs.
#let a = [#set par(spacing: 40pt);Hello]
-#let b = [#set par(spacing: 60pt);World]
+#let b = [#set par(spacing: 10pt);World]
{a}{b}
---