summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/flow-first-region-counter-update-placed-and-line.pngbin1525 -> 1524 bytes
-rw-r--r--tests/ref/grid-breaking-expand-vertically.pngbin700 -> 703 bytes
-rw-r--r--tests/ref/label-on-text.pngbin1404 -> 0 bytes
-rw-r--r--tests/ref/page-marginal-style-show-rule-with-set-page.pngbin727 -> 716 bytes
-rw-r--r--tests/ref/show-set-text-order-contained-1.pngbin488 -> 458 bytes
-rw-r--r--tests/ref/show-set-text-order-contained-2.pngbin249 -> 442 bytes
-rw-r--r--tests/ref/show-set-text-order-overlapping-1.pngbin653 -> 574 bytes
-rw-r--r--tests/ref/show-set-text-order-overlapping-2.pngbin321 -> 574 bytes
-rw-r--r--tests/ref/show-text-after-normal-show.pngbin0 -> 736 bytes
-rw-r--r--tests/ref/show-text-apostrophe.pngbin0 -> 1530 bytes
-rw-r--r--tests/ref/show-text-citation-smartquote.pngbin0 -> 494 bytes
-rw-r--r--tests/ref/show-text-citation.pngbin0 -> 527 bytes
-rw-r--r--tests/ref/show-text-linebreak.pngbin0 -> 829 bytes
-rw-r--r--tests/ref/show-text-list.pngbin0 -> 312 bytes
-rw-r--r--tests/ref/show-text-outer-space.pngbin0 -> 548 bytes
-rw-r--r--tests/ref/show-text-smartquote.pngbin0 -> 1320 bytes
-rw-r--r--tests/ref/show-text-space-collapsing.pngbin0 -> 566 bytes
-rw-r--r--tests/ref/show-text-style-boundary.pngbin0 -> 1378 bytes
-rw-r--r--tests/ref/show-text-within-par.pngbin0 -> 1790 bytes
-rw-r--r--tests/suite/foundations/label.typ9
-rw-r--r--tests/suite/layout/flow/invisibles.typ2
-rw-r--r--tests/suite/layout/grid/grid.typ4
-rw-r--r--tests/suite/layout/place.typ2
-rw-r--r--tests/suite/styling/show-text.typ63
24 files changed, 67 insertions, 13 deletions
diff --git a/tests/ref/flow-first-region-counter-update-placed-and-line.png b/tests/ref/flow-first-region-counter-update-placed-and-line.png
index 95ca518e..c5950783 100644
--- a/tests/ref/flow-first-region-counter-update-placed-and-line.png
+++ b/tests/ref/flow-first-region-counter-update-placed-and-line.png
Binary files differ
diff --git a/tests/ref/grid-breaking-expand-vertically.png b/tests/ref/grid-breaking-expand-vertically.png
index 14434d7c..2e1b2db2 100644
--- a/tests/ref/grid-breaking-expand-vertically.png
+++ b/tests/ref/grid-breaking-expand-vertically.png
Binary files differ
diff --git a/tests/ref/label-on-text.png b/tests/ref/label-on-text.png
deleted file mode 100644
index 67fb1aa8..00000000
--- a/tests/ref/label-on-text.png
+++ /dev/null
Binary files differ
diff --git a/tests/ref/page-marginal-style-show-rule-with-set-page.png b/tests/ref/page-marginal-style-show-rule-with-set-page.png
index 138f2272..f05c64a7 100644
--- a/tests/ref/page-marginal-style-show-rule-with-set-page.png
+++ b/tests/ref/page-marginal-style-show-rule-with-set-page.png
Binary files differ
diff --git a/tests/ref/show-set-text-order-contained-1.png b/tests/ref/show-set-text-order-contained-1.png
index 8deaaacd..1bc95e3b 100644
--- a/tests/ref/show-set-text-order-contained-1.png
+++ b/tests/ref/show-set-text-order-contained-1.png
Binary files differ
diff --git a/tests/ref/show-set-text-order-contained-2.png b/tests/ref/show-set-text-order-contained-2.png
index 00ea3fb8..89309370 100644
--- a/tests/ref/show-set-text-order-contained-2.png
+++ b/tests/ref/show-set-text-order-contained-2.png
Binary files differ
diff --git a/tests/ref/show-set-text-order-overlapping-1.png b/tests/ref/show-set-text-order-overlapping-1.png
index 71222567..83983b4d 100644
--- a/tests/ref/show-set-text-order-overlapping-1.png
+++ b/tests/ref/show-set-text-order-overlapping-1.png
Binary files differ
diff --git a/tests/ref/show-set-text-order-overlapping-2.png b/tests/ref/show-set-text-order-overlapping-2.png
index f1b658f2..83983b4d 100644
--- a/tests/ref/show-set-text-order-overlapping-2.png
+++ b/tests/ref/show-set-text-order-overlapping-2.png
Binary files differ
diff --git a/tests/ref/show-text-after-normal-show.png b/tests/ref/show-text-after-normal-show.png
new file mode 100644
index 00000000..517ad638
--- /dev/null
+++ b/tests/ref/show-text-after-normal-show.png
Binary files differ
diff --git a/tests/ref/show-text-apostrophe.png b/tests/ref/show-text-apostrophe.png
new file mode 100644
index 00000000..7c328836
--- /dev/null
+++ b/tests/ref/show-text-apostrophe.png
Binary files differ
diff --git a/tests/ref/show-text-citation-smartquote.png b/tests/ref/show-text-citation-smartquote.png
new file mode 100644
index 00000000..d3a2b5c3
--- /dev/null
+++ b/tests/ref/show-text-citation-smartquote.png
Binary files differ
diff --git a/tests/ref/show-text-citation.png b/tests/ref/show-text-citation.png
new file mode 100644
index 00000000..9a402dfe
--- /dev/null
+++ b/tests/ref/show-text-citation.png
Binary files differ
diff --git a/tests/ref/show-text-linebreak.png b/tests/ref/show-text-linebreak.png
new file mode 100644
index 00000000..716eca42
--- /dev/null
+++ b/tests/ref/show-text-linebreak.png
Binary files differ
diff --git a/tests/ref/show-text-list.png b/tests/ref/show-text-list.png
new file mode 100644
index 00000000..4d04a8cf
--- /dev/null
+++ b/tests/ref/show-text-list.png
Binary files differ
diff --git a/tests/ref/show-text-outer-space.png b/tests/ref/show-text-outer-space.png
new file mode 100644
index 00000000..d497af83
--- /dev/null
+++ b/tests/ref/show-text-outer-space.png
Binary files differ
diff --git a/tests/ref/show-text-smartquote.png b/tests/ref/show-text-smartquote.png
new file mode 100644
index 00000000..9a93c66c
--- /dev/null
+++ b/tests/ref/show-text-smartquote.png
Binary files differ
diff --git a/tests/ref/show-text-space-collapsing.png b/tests/ref/show-text-space-collapsing.png
new file mode 100644
index 00000000..5794cefe
--- /dev/null
+++ b/tests/ref/show-text-space-collapsing.png
Binary files differ
diff --git a/tests/ref/show-text-style-boundary.png b/tests/ref/show-text-style-boundary.png
new file mode 100644
index 00000000..39a440f2
--- /dev/null
+++ b/tests/ref/show-text-style-boundary.png
Binary files differ
diff --git a/tests/ref/show-text-within-par.png b/tests/ref/show-text-within-par.png
new file mode 100644
index 00000000..e7bccc49
--- /dev/null
+++ b/tests/ref/show-text-within-par.png
Binary files differ
diff --git a/tests/suite/foundations/label.typ b/tests/suite/foundations/label.typ
index 4875f697..af6d2380 100644
--- a/tests/suite/foundations/label.typ
+++ b/tests/suite/foundations/label.typ
@@ -19,15 +19,6 @@ The end.
#let b = [*B*]
#a <v> #b
---- label-on-text ---
-// Test labelled text.
-#show "t": it => {
- set text(blue) if it.has("label") and it.label == <last>
- it
-}
-
-This is a thing #[that <last>] happened.
-
--- label-dynamic-show-set ---
// Test abusing dynamic labels for styling.
#show <red>: set text(red)
diff --git a/tests/suite/layout/flow/invisibles.typ b/tests/suite/layout/flow/invisibles.typ
index 28118cb9..e9c2436f 100644
--- a/tests/suite/layout/flow/invisibles.typ
+++ b/tests/suite/layout/flow/invisibles.typ
@@ -56,6 +56,6 @@ Mix-and-match all the previous tests.
#counter("dummy").step()
#place(dx: -0.5cm, dy: -0.75cm, box(width: 200%)[OOF])
#line(length: 100%)
- #place(dy: -0.8em)[OOF]
+ #place(dy: 0.2em)[OOF]
#rect(height: 2cm, fill: gray)
]
diff --git a/tests/suite/layout/grid/grid.typ b/tests/suite/layout/grid/grid.typ
index 2d45095d..d35adca5 100644
--- a/tests/suite/layout/grid/grid.typ
+++ b/tests/suite/layout/grid/grid.typ
@@ -184,8 +184,8 @@
Top
#align(bottom)[
Bottom \
- Bottom \
- #v(0pt)
+ Bottom
+
Top
]
],
diff --git a/tests/suite/layout/place.typ b/tests/suite/layout/place.typ
index 0922800d..c29d2ddd 100644
--- a/tests/suite/layout/place.typ
+++ b/tests/suite/layout/place.typ
@@ -54,9 +54,9 @@ Second
--- place-float ---
#set page(height: 140pt)
#set place(clearance: 5pt)
-#lorem(6)
#place(auto, float: true, rect[A])
#place(auto, float: true, rect[B])
+#lorem(6)
#place(auto, float: true, rect[C])
#place(auto, float: true, rect[D])
diff --git a/tests/suite/styling/show-text.typ b/tests/suite/styling/show-text.typ
index 56b659b2..d073f72e 100644
--- a/tests/suite/styling/show-text.typ
+++ b/tests/suite/styling/show-text.typ
@@ -131,3 +131,66 @@ Heya
#show "Heya": set text(red)
#show "yaho": set text(weight: "bold")
Heyaho
+
+--- show-text-smartquote ---
+#show "up,\" she": set text(red)
+"What's up," she asked.
+
+--- show-text-apostrophe ---
+#show regex("Who's|We've"): highlight
+Who's got it? \
+We've got it.
+
+--- show-text-citation ---
+#show "hey": [@arrgh]
+@netwok hey
+
+#show bibliography: none
+#bibliography("/assets/bib/works.bib")
+
+--- show-text-list ---
+#show "hi": [- B]
+- A
+hi
+- C
+
+--- show-text-citation-smartquote ---
+#show "hey \"": [@arrgh]
+#show "dis": [@distress]
+@netwok hey " dis
+
+#show bibliography: none
+#bibliography("/assets/bib/works.bib")
+
+--- show-text-linebreak ---
+#show "lo\nwo": set text(red)
+Hello #[ ] \
+#[ ] #[ ] world!
+
+--- show-text-after-normal-show ---
+#show rect: "world"
+#show "lo wo": set text(red)
+hello #rect()
+
+--- show-text-space-collapsing ---
+#show "i ther": set text(red)
+hi#[ ]#[ ]the#"re"
+
+--- show-text-style-boundary ---
+#show "What's up": set text(blue)
+#show "your party": underline
+What's #[ ] up at #"your" #text(red)[party?]
+
+--- show-text-within-par ---
+#show "Pythagoras'": highlight
+$a^2 + b^2 = c^2$ is Pythagoras' theorem.
+
+--- show-text-outer-space ---
+// Spaces must be interior to strong textual elements for matching to work.
+// For outer spaces, it is hard to say whether they would collapse.
+#show "a\n": set text(blue)
+#show "b\n ": set text(blue)
+#show " c ": set text(blue)
+a \ #h(0pt, weak: true)
+b \ #h(0pt, weak: true)
+$x$ c $y$