summaryrefslogtreecommitdiff
path: root/tests/suite
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-07-04 12:57:40 +0200
committerGitHub <noreply@github.com>2024-07-04 10:57:40 +0000
commit0ef672c347f368325313c8bccc4f70e3f1016b0a (patch)
tree8971d6b305d805b42b55e1e85613e4f4c5ba175d /tests/suite
parent75246f930b9041c206a8a3c87e6db03bfc9111fd (diff)
Refactor line building (#4497)
Diffstat (limited to 'tests/suite')
-rw-r--r--tests/suite/foundations/version.typ2
-rw-r--r--tests/suite/layout/spacing.typ12
-rw-r--r--tests/suite/model/par.typ19
3 files changed, 26 insertions, 7 deletions
diff --git a/tests/suite/foundations/version.typ b/tests/suite/foundations/version.typ
index bf2cadb1..a4be7f13 100644
--- a/tests/suite/foundations/version.typ
+++ b/tests/suite/foundations/version.typ
@@ -4,7 +4,7 @@
// Test version constructor.
// Empty.
-#version()
+#test(array(version()), ())
// Plain.
#test(version(1, 2).major, 1)
diff --git a/tests/suite/layout/spacing.typ b/tests/suite/layout/spacing.typ
index dd0fced5..c32e6c8f 100644
--- a/tests/suite/layout/spacing.typ
+++ b/tests/suite/layout/spacing.typ
@@ -47,14 +47,14 @@ Totally #h() ignored
Hello #h(2cm, weak: true)
--- issue-4087 ---
-// weak space at the end of the line would be removed.
+// Weak space at the end of the line is removed.
This is the first line #h(2cm, weak: true) A new line
-// non-weak space would be consume a specified width and push next line.
+// Non-weak space consumes a specified width and pushes to next line.
This is the first line #h(2cm, weak: false) A new line
-// similarly weak space at the beginning of the line would be removed.
-This is the first line\ #h(2cm, weak: true) A new line
+// Similarly, weak space at the beginning of the line is removed.
+This is the first line \ #h(2cm, weak: true) A new line
-// non-spacing, on the other hand, is not removed.
-This is the first line\ #h(2cm, weak: false) A new line
+// Non-weak-spacing, on the other hand, is not removed.
+This is the first line \ #h(2cm, weak: false) A new line
diff --git a/tests/suite/model/par.typ b/tests/suite/model/par.typ
index f07c4c6c..80bc9f3e 100644
--- a/tests/suite/model/par.typ
+++ b/tests/suite/model/par.typ
@@ -78,3 +78,22 @@ Welcome \ here. Does this work well?
#set text(dir: rtl)
لآن وقد أظلم الليل وبدأت النجوم
تنضخ وجه الطبيعة التي أعْيَتْ من طول ما انبعثت في النهار
+
+--- par-trailing-whitespace ---
+// Ensure that trailing whitespace layouts as intended.
+#box(fill: aqua, " ")
+
+--- par-empty-metadata ---
+// Check that metadata still works in a zero length paragraph.
+#block(height: 0pt)[#""#metadata(false)<hi>]
+#context test(query(<hi>).first().value, false)
+
+--- par-metadata-after-trimmed-space ---
+// Ensure that metadata doesn't prevent trailing spaces from being trimmed.
+#set par(justify: true, linebreaks: "simple")
+#set text(hyphenate: false)
+Lorem ipsum dolor #metadata(none) nonumy eirmod tempor.
+
+--- issue-4278-par-trim-before-equation ---
+#set par(justify: true)
+#lorem(6) aa $a = c + b$