summaryrefslogtreecommitdiff
path: root/tests/typ/text
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-12-15 11:12:38 +0100
committerLaurenz <laurmaedje@gmail.com>2021-12-15 11:12:38 +0100
commit57f5c0a1b15775f9500335f455c7dc7d70cea9f5 (patch)
tree1448c12ba70acd3bcd96aea973a511641497f3de /tests/typ/text
parentae38be9097bbb32142ef776e77e627ac12379000 (diff)
Set Rules Episode V: The Tests Strike Back
Diffstat (limited to 'tests/typ/text')
-rw-r--r--tests/typ/text/links.typ7
-rw-r--r--tests/typ/text/par.typ17
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/typ/text/links.typ b/tests/typ/text/links.typ
index e5f7affc..1a77e34b 100644
--- a/tests/typ/text/links.typ
+++ b/tests/typ/text/links.typ
@@ -20,3 +20,10 @@ You could also make the #link("https://html5zombo.com/")[link look way more typi
#page(height: 60pt)
#let link = link("https://typst.app/")[LINK]
My cool #move(x: 0.7cm, y: 0.7cm, rotate(10deg, scale(200%, link)))
+
+---
+// Link containing a block.
+#link("https://example.com/", block[
+ My cool rhino
+ #move(x: 10pt, image("../../res/rhino.png", width: 1cm))
+])
diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ
index 7b6bd289..9c14279c 100644
--- a/tests/typ/text/par.typ
+++ b/tests/typ/text/par.typ
@@ -6,6 +6,23 @@
To the right! Where the sunlight peeks behind the mountain.
---
+// Test that explicit paragraph break respects active styles.
+#par(spacing: 7pt)
+[#par(spacing: 100pt) First]
+
+[#par(spacing: 100pt) Second]
+#par(spacing: 20pt)
+
+Third
+
+---
+// Test that paragraph break due to incompatibility respects
+// spacing defined by the two adjacent paragraphs.
+#let a = [#par(spacing: 40pt) Hello]
+#let b = [#par(spacing: 60pt) World]
+{a}{b}
+
+---
// Test weird metrics.
#par(spacing: 100%, leading: 0pt)
But, soft! what light through yonder window breaks?