summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-12 18:58:39 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-12 19:57:28 +0100
commit3ffa7393f0632d9ee5dd9c821685a1a033d5c0ab (patch)
treeaf09b0683352c4028436a2e5251dce54cf41d4aa /tests
parentf4856c18b9cf3f6952276cc61b557aebeb2fa651 (diff)
Make all nodes block-level
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/compiler/color.pngbin506 -> 444 bytes
-rw-r--r--tests/ref/compiler/import.pngbin4091 -> 4121 bytes
-rw-r--r--tests/ref/compiler/show-text.pngbin43571 -> 43679 bytes
-rw-r--r--tests/ref/compute/construct.pngbin1308 -> 1306 bytes
-rw-r--r--tests/ref/text/edge.pngbin16107 -> 15927 bytes
-rw-r--r--tests/ref/text/em.pngbin1900 -> 1904 bytes
-rw-r--r--tests/ref/visualize/image.pngbin176635 -> 175433 bytes
-rw-r--r--tests/ref/visualize/shape-aspect.pngbin4751 -> 4558 bytes
-rw-r--r--tests/ref/visualize/shape-circle.pngbin39582 -> 39714 bytes
-rw-r--r--tests/ref/visualize/shape-ellipse.pngbin23989 -> 24080 bytes
-rw-r--r--tests/ref/visualize/shape-rect.pngbin9426 -> 9397 bytes
-rw-r--r--tests/ref/visualize/shape-rounded.pngbin769 -> 876 bytes
-rw-r--r--tests/ref/visualize/shape-square.pngbin18059 -> 18061 bytes
-rw-r--r--tests/typ/compiler/color.typ28
-rw-r--r--tests/typ/compiler/construct.typ2
-rw-r--r--tests/typ/compiler/show-node.typ2
-rw-r--r--tests/typ/compiler/show-selector.typ5
-rw-r--r--tests/typ/compiler/show-text.typ4
-rw-r--r--tests/typ/compute/construct.typ3
-rw-r--r--tests/typ/layout/columns.typ4
-rw-r--r--tests/typ/layout/par-bidi.typ2
-rw-r--r--tests/typ/layout/par-indent.typ2
-rw-r--r--tests/typ/layout/transform.typ12
-rw-r--r--tests/typ/meta/link.typ4
-rw-r--r--tests/typ/text/baseline.typ4
-rw-r--r--tests/typ/text/em.typ3
-rw-r--r--tests/typ/text/shift.typ4
-rw-r--r--tests/typ/visualize/image.typ7
-rw-r--r--tests/typ/visualize/line.typ3
-rw-r--r--tests/typ/visualize/shape-aspect.typ55
-rw-r--r--tests/typ/visualize/shape-circle.typ25
-rw-r--r--tests/typ/visualize/shape-ellipse.typ8
-rw-r--r--tests/typ/visualize/shape-fill-stroke.typ2
-rw-r--r--tests/typ/visualize/shape-rect.typ26
-rw-r--r--tests/typ/visualize/shape-square.typ6
35 files changed, 118 insertions, 93 deletions
diff --git a/tests/ref/compiler/color.png b/tests/ref/compiler/color.png
index 9b65c16d..8f329fab 100644
--- a/tests/ref/compiler/color.png
+++ b/tests/ref/compiler/color.png
Binary files differ
diff --git a/tests/ref/compiler/import.png b/tests/ref/compiler/import.png
index 89880086..5fbd6e89 100644
--- a/tests/ref/compiler/import.png
+++ b/tests/ref/compiler/import.png
Binary files differ
diff --git a/tests/ref/compiler/show-text.png b/tests/ref/compiler/show-text.png
index d0ed2f92..fc76f132 100644
--- a/tests/ref/compiler/show-text.png
+++ b/tests/ref/compiler/show-text.png
Binary files differ
diff --git a/tests/ref/compute/construct.png b/tests/ref/compute/construct.png
index 6e637f34..66ccd3ba 100644
--- a/tests/ref/compute/construct.png
+++ b/tests/ref/compute/construct.png
Binary files differ
diff --git a/tests/ref/text/edge.png b/tests/ref/text/edge.png
index 817e3300..0ae2ec12 100644
--- a/tests/ref/text/edge.png
+++ b/tests/ref/text/edge.png
Binary files differ
diff --git a/tests/ref/text/em.png b/tests/ref/text/em.png
index c0afa6fb..6440e629 100644
--- a/tests/ref/text/em.png
+++ b/tests/ref/text/em.png
Binary files differ
diff --git a/tests/ref/visualize/image.png b/tests/ref/visualize/image.png
index a89f1963..eaea3499 100644
--- a/tests/ref/visualize/image.png
+++ b/tests/ref/visualize/image.png
Binary files differ
diff --git a/tests/ref/visualize/shape-aspect.png b/tests/ref/visualize/shape-aspect.png
index 46cb12ad..331c5fe5 100644
--- a/tests/ref/visualize/shape-aspect.png
+++ b/tests/ref/visualize/shape-aspect.png
Binary files differ
diff --git a/tests/ref/visualize/shape-circle.png b/tests/ref/visualize/shape-circle.png
index acb1d02a..27aaf819 100644
--- a/tests/ref/visualize/shape-circle.png
+++ b/tests/ref/visualize/shape-circle.png
Binary files differ
diff --git a/tests/ref/visualize/shape-ellipse.png b/tests/ref/visualize/shape-ellipse.png
index 50467dce..da9278d5 100644
--- a/tests/ref/visualize/shape-ellipse.png
+++ b/tests/ref/visualize/shape-ellipse.png
Binary files differ
diff --git a/tests/ref/visualize/shape-rect.png b/tests/ref/visualize/shape-rect.png
index 5eeab37f..9586d005 100644
--- a/tests/ref/visualize/shape-rect.png
+++ b/tests/ref/visualize/shape-rect.png
Binary files differ
diff --git a/tests/ref/visualize/shape-rounded.png b/tests/ref/visualize/shape-rounded.png
index ae8df178..5e761a4d 100644
--- a/tests/ref/visualize/shape-rounded.png
+++ b/tests/ref/visualize/shape-rounded.png
Binary files differ
diff --git a/tests/ref/visualize/shape-square.png b/tests/ref/visualize/shape-square.png
index e8433a56..d710b84c 100644
--- a/tests/ref/visualize/shape-square.png
+++ b/tests/ref/visualize/shape-square.png
Binary files differ
diff --git a/tests/typ/compiler/color.typ b/tests/typ/compiler/color.typ
index 3b165d14..fbb1749b 100644
--- a/tests/typ/compiler/color.typ
+++ b/tests/typ/compiler/color.typ
@@ -1,22 +1,26 @@
// Test color modification methods.
---
-// Test gray color modification.
-#test(luma(20%).lighten(50%), luma(60%))
-#test(luma(80%).darken(20%), luma(63.9%))
-#test(luma(80%).negate(), luma(20%))
-
----
// Test CMYK color conversion.
-// Ref: true
#let c = cmyk(50%, 64%, 16%, 17%)
-#rect(width: 1cm, fill: cmyk(69%, 11%, 69%, 41%))
-#rect(width: 1cm, fill: c)
-#rect(width: 1cm, fill: c.negate())
+#stack(
+ dir: ltr,
+ spacing: 1fr,
+ rect(width: 1cm, fill: cmyk(69%, 11%, 69%, 41%)),
+ rect(width: 1cm, fill: c),
+ rect(width: 1cm, fill: c.negate()),
+)
#for x in range(0, 11) {
- square(size: 9pt, fill: c.lighten(x * 10%))
+ box(square(size: 9pt, fill: c.lighten(x * 10%)))
}
#for x in range(0, 11) {
- square(size: 9pt, fill: c.darken(x * 10%))
+ box(square(size: 9pt, fill: c.darken(x * 10%)))
}
+
+---
+// Test gray color modification.
+// Ref: false
+#test(luma(20%).lighten(50%), luma(60%))
+#test(luma(80%).darken(20%), luma(63.9%))
+#test(luma(80%).negate(), luma(20%))
diff --git a/tests/typ/compiler/construct.typ b/tests/typ/compiler/construct.typ
index 161827cb..53fcfefb 100644
--- a/tests/typ/compiler/construct.typ
+++ b/tests/typ/compiler/construct.typ
@@ -22,7 +22,7 @@
---
// The inner rectangle should not be yellow here.
-A #rect(fill: yellow, inset: 5pt, rect()) B
+A #box(rect(fill: yellow, inset: 5pt, rect())) B
---
// The constructor property should still work
diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ
index 4aba4e9b..f6298a28 100644
--- a/tests/typ/compiler/show-node.typ
+++ b/tests/typ/compiler/show-node.typ
@@ -28,7 +28,7 @@ my heading?
// Test integrated example.
#show heading: it => block({
set text(10pt)
- move(dy: -1pt)[📖]
+ box(move(dy: -1pt)[📖])
h(5pt)
if it.level == 1 {
underline(text(1.25em, blue, it.title))
diff --git a/tests/typ/compiler/show-selector.typ b/tests/typ/compiler/show-selector.typ
index 56e82769..ebd84837 100644
--- a/tests/typ/compiler/show-selector.typ
+++ b/tests/typ/compiler/show-selector.typ
@@ -2,12 +2,13 @@
---
// Inline code.
-#show raw.where(block: false): rect.with(
+#show raw.where(block: false): it => box(rect(
radius: 2pt,
outset: (y: 3pt),
inset: (x: 3pt, y: 0pt),
fill: luma(230),
-)
+ it,
+))
// Code blocks.
#show raw.where(block: true): rect.with(
diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ
index c867ff9f..e0fdb793 100644
--- a/tests/typ/compiler/show-text.typ
+++ b/tests/typ/compiler/show-text.typ
@@ -8,7 +8,7 @@ Die Zeitung Der Spiegel existiert.
---
// Another classic example.
-#show "TeX": [T#h(-0.145em)#move(dy: 0.233em)[E]#h(-0.135em)X]
+#show "TeX": [T#h(-0.145em)#box(move(dy: 0.233em)[E])#h(-0.135em)X]
#show regex("(Lua)?(La)?TeX"): name => box(text("Latin Modern Roman")[#name])
TeX, LaTeX, LuaTeX and LuaLaTeX!
@@ -28,7 +28,7 @@ Treeworld, the World of worlds, is a world.
---
// This is a fun one.
#set par(justify: true)
-#show regex("\S"): letter => rect(inset: 2pt)[#upper(letter)]
+#show regex("\S"): letter => box(rect(inset: 2pt, upper(letter)))
#lorem(5)
---
diff --git a/tests/typ/compute/construct.typ b/tests/typ/compute/construct.typ
index 50fa4e3e..80fa9a2b 100644
--- a/tests/typ/compute/construct.typ
+++ b/tests/typ/compute/construct.typ
@@ -17,8 +17,7 @@
---
// Test gray color conversion.
// Ref: true
-#rect(fill: luma(0))
-#rect(fill: luma(80%))
+#stack(dir: ltr, rect(fill: luma(0)), rect(fill: luma(80%)))
---
// Error for values that are out of range.
diff --git a/tests/typ/layout/columns.typ b/tests/typ/layout/columns.typ
index 8702688c..1d82113c 100644
--- a/tests/typ/layout/columns.typ
+++ b/tests/typ/layout/columns.typ
@@ -6,10 +6,10 @@
#set text(lang: "ar", "Noto Sans Arabic", "IBM Plex Serif")
#set columns(gutter: 30pt)
-#rect(fill: conifer, height: 8pt, width: 6pt) وتحفيز
+#box(rect(fill: conifer, height: 8pt, width: 6pt)) وتحفيز
العديد من التفاعلات الكيميائية. (DNA) من أهم الأحماض النووية التي تُشكِّل
إلى جانب كل من البروتينات والليبيدات والسكريات المتعددة
-#rect(fill: eastern, height: 8pt, width: 6pt)
+#box(rect(fill: eastern, height: 8pt, width: 6pt))
الجزيئات الضخمة الأربعة الضرورية للحياة.
---
diff --git a/tests/typ/layout/par-bidi.typ b/tests/typ/layout/par-bidi.typ
index 31e3fded..a7274e8a 100644
--- a/tests/typ/layout/par-bidi.typ
+++ b/tests/typ/layout/par-bidi.typ
@@ -43,7 +43,7 @@ Lריווח #h(1cm) R
---
// Test inline object.
#set text(lang: "he", "IBM Plex Serif")
-קרנפיםRh#image("/rhino.png", height: 11pt)inoחיים
+קרנפיםRh#box(image("/rhino.png", height: 11pt))inoחיים
---
// Test whether L1 whitespace resetting destroys stuff.
diff --git a/tests/typ/layout/par-indent.typ b/tests/typ/layout/par-indent.typ
index d328da41..3e44d73b 100644
--- a/tests/typ/layout/par-indent.typ
+++ b/tests/typ/layout/par-indent.typ
@@ -9,7 +9,7 @@ The first paragraph has no indent.
But the second one does.
-#image("/tiger.jpg", height: 6pt)
+#box(image("/tiger.jpg", height: 6pt))
starts a paragraph without indent.
#align(center, image("/rhino.png", width: 1cm))
diff --git a/tests/typ/layout/transform.typ b/tests/typ/layout/transform.typ
index cc7494b3..cc744952 100644
--- a/tests/typ/layout/transform.typ
+++ b/tests/typ/layout/transform.typ
@@ -6,7 +6,7 @@
#let tex = {
[T]
h(-0.14 * size)
- move(dy: 0.22 * size)[E]
+ box(move(dy: 0.22 * size)[E])
h(-0.12 * size)
[X]
}
@@ -14,11 +14,11 @@
#let xetex = {
[X]
h(-0.14 * size)
- scale(x: -100%, move(dy: 0.26 * size)[E])
+ box(scale(x: -100%, move(dy: 0.26 * size)[E]))
h(-0.14 * size)
[T]
h(-0.14 * size)
- move(dy: 0.26 * size)[E]
+ box(move(dy: 0.26 * size)[E])
h(-0.12 * size)
[X]
}
@@ -44,6 +44,6 @@ nor #xetex!
// Test setting scaling origin.
#let r = rect(width: 100pt, height: 10pt, fill: forest)
#set page(height: 65pt)
-#scale(r, x: 50%, y: 200%, origin: left + top)
-#scale(r, x: 50%, origin: center)
-#scale(r, x: 50%, y: 200%, origin: right + bottom)
+#box(scale(r, x: 50%, y: 200%, origin: left + top))
+#box(scale(r, x: 50%, origin: center))
+#box(scale(r, x: 50%, y: 200%, origin: right + bottom))
diff --git a/tests/typ/meta/link.typ b/tests/typ/meta/link.typ
index 4ed7e58d..3ceb261d 100644
--- a/tests/typ/meta/link.typ
+++ b/tests/typ/meta/link.typ
@@ -32,13 +32,13 @@ You could also make the
// Transformed link.
#set page(height: 60pt)
#let mylink = link("https://typst.org/")[LINK]
-My cool #move(dx: 0.7cm, dy: 0.7cm, rotate(10deg, scale(200%, mylink)))
+My cool #box(move(dx: 0.7cm, dy: 0.7cm, rotate(10deg, scale(200%, mylink))))
---
// Link containing a block.
#link("https://example.com/", block[
My cool rhino
- #move(dx: 10pt, image("/rhino.png", width: 1cm))
+ #box(move(dx: 10pt, image("/rhino.png", width: 1cm)))
])
---
diff --git a/tests/typ/text/baseline.typ b/tests/typ/text/baseline.typ
index cd331c77..57963195 100644
--- a/tests/typ/text/baseline.typ
+++ b/tests/typ/text/baseline.typ
@@ -4,6 +4,6 @@
Hi #text(1.5em)[You], #text(0.75em)[how are you?]
Our cockatoo was one of the
-#text(baseline: -0.2em)[#circle(radius: 2pt) first]
-#text(baseline: 0.2em)[birds #circle(radius: 2pt)]
+#text(baseline: -0.2em)[#box(circle(radius: 2pt)) first]
+#text(baseline: 0.2em)[birds #box(circle(radius: 2pt))]
that ever learned to mimic a human voice.
diff --git a/tests/typ/text/em.typ b/tests/typ/text/em.typ
index f901aae4..bf191c1f 100644
--- a/tests/typ/text/em.typ
+++ b/tests/typ/text/em.typ
@@ -30,5 +30,4 @@ G // 5pt
size - 3pt
}
-#square(size: size)
-#square(size: 25pt)
+#stack(dir: ltr, spacing: 1fr, square(size: size), square(size: 25pt))
diff --git a/tests/typ/text/shift.typ b/tests/typ/text/shift.typ
index 6fe31bec..2b1b8984 100644
--- a/tests/typ/text/shift.typ
+++ b/tests/typ/text/shift.typ
@@ -4,8 +4,8 @@
#table(
columns: 3,
[Typo.], [Fallb.], [Synth],
- [x#super[1]], [x#super[5n]], [x#super[2 #square(size: 6pt)]],
- [x#sub[1]], [x#sub[5n]], [x#sub[2 #square(size: 6pt)]],
+ [x#super[1]], [x#super[5n]], [x#super[2 #box(square(size: 6pt))]],
+ [x#sub[1]], [x#sub[5n]], [x#sub[2 #box(square(size: 6pt))]],
)
---
diff --git a/tests/typ/visualize/image.typ b/tests/typ/visualize/image.typ
index 89381955..4b3d390f 100644
--- a/tests/typ/visualize/image.typ
+++ b/tests/typ/visualize/image.typ
@@ -14,8 +14,8 @@
// Test configuring the size and fitting behaviour of images.
// Set width and height explicitly.
-#image("/rhino.png", width: 30pt)
-#image("/rhino.png", height: 30pt)
+#box(image("/rhino.png", width: 30pt))
+#box(image("/rhino.png", height: 30pt))
// Set width and height explicitly and force stretching.
#image("/monkey.svg", width: 100%, height: 20pt, fit: "stretch")
@@ -38,13 +38,12 @@
---
// Does not fit to remaining height of page.
#set page(height: 60pt)
-Stuff #parbreak()
Stuff
#image("/rhino.png")
---
// Test baseline.
-A #image("/tiger.jpg", height: 1cm, width: 80%) B
+A #box(image("/tiger.jpg", height: 1cm, width: 80%)) B
---
// Test advanced SVG features.
diff --git a/tests/typ/visualize/line.typ b/tests/typ/visualize/line.typ
index a7bca613..8c405932 100644
--- a/tests/typ/visualize/line.typ
+++ b/tests/typ/visualize/line.typ
@@ -7,8 +7,7 @@
place(line(end: (0.4em, 0pt)))
place(line(start: (0pt, 0.4em), end: (0pt, 0pt)))
line(end: (0.6em, 0.6em))
-})
-Hello #line()!
+}) Hello #box(line(length: 1cm))!
#line(end: (70%, 50%))
diff --git a/tests/typ/visualize/shape-aspect.typ b/tests/typ/visualize/shape-aspect.typ
index d2dc1140..d3606808 100644
--- a/tests/typ/visualize/shape-aspect.typ
+++ b/tests/typ/visualize/shape-aspect.typ
@@ -4,26 +4,35 @@
// Test relative width and height and size that is smaller
// than default size.
#set page(width: 120pt, height: 70pt)
-#set align(center + horizon)
-#square(width: 50%, [A])
-#square(height: 50%)
-#box(stack(
- square(size: 10pt),
- square(size: 20pt, [B])
-))
+#set align(bottom)
+#let centered = align.with(center + horizon)
+#stack(
+ dir: ltr,
+ spacing: 1fr,
+ square(width: 50%, centered[A]),
+ square(height: 50%),
+ stack(
+ square(size: 10pt),
+ square(size: 20pt, centered[B])
+ ),
+)
---
// Test alignment in automatically sized square and circle.
#set text(8pt)
-#square(inset: 4pt)[
+#box(square(inset: 4pt)[
Hey there, #align(center + bottom, rotate(180deg, [you!]))
-]
-#circle(align(center + horizon, [Hey.]))
+])
+#box(circle(align(center + horizon, [Hey.])))
---
-// Test that maximum wins if both width and height are given.
-#square(width: 10pt, height: 20pt)
-#circle(width: 20%, height: 10pt)
+// Test that minimum wins if both width and height are given.
+#stack(
+ dir: ltr,
+ spacing: 2pt,
+ square(width: 20pt, height: 40pt),
+ circle(width: 20%, height: 100pt),
+)
---
// Test square that is limited by region size.
@@ -33,18 +42,22 @@
---
// Test different ways of sizing.
#set page(width: 120pt, height: 40pt)
-#circle(radius: 5pt)
-#circle(width: 10%)
-#circle(height: 50%)
+#stack(
+ dir: ltr,
+ spacing: 2pt,
+ circle(radius: 5pt),
+ circle(width: 10%),
+ circle(height: 50%),
+)
---
-// Test square that is overflowing due to its aspect ratio.
-#set page(width: 40pt, height: 20pt, margin: 5pt)
-#square(width: 100%) #parbreak()
-#square(width: 100%)[Hey]
+// Test that square doesn't overflow due to its aspect ratio.
+#set page(width: 40pt, height: 25pt, margin: 5pt)
+#square(width: 100%)
+#square(width: 100%)[Hello there]
---
// Size cannot be relative because we wouldn't know
// relative to which axis.
-// Error: 15-18 expected length, found ratio
+// Error: 15-18 expected length or auto, found ratio
#square(size: 50%)
diff --git a/tests/typ/visualize/shape-circle.typ b/tests/typ/visualize/shape-circle.typ
index 23c6fcbd..94facdeb 100644
--- a/tests/typ/visualize/shape-circle.typ
+++ b/tests/typ/visualize/shape-circle.typ
@@ -2,14 +2,14 @@
---
// Default circle.
-#circle()
-#circle[Hey]
+#box(circle())
+#box(circle[Hey])
---
// Test auto sizing.
#set circle(inset: 0pt)
-Auto-sized circle. \
+Auto-sized circle.
#circle(fill: rgb("eb5278"), stroke: 2pt + black,
align(center + horizon)[But, soft!]
)
@@ -21,7 +21,7 @@ Center-aligned rect in auto-sized circle.
)
)
-Rect in auto-sized circle. \
+Rect in auto-sized circle.
#circle(fill: forest,
rect(fill: conifer, stroke: white, inset: 4pt)[
#set text(8pt)
@@ -39,13 +39,18 @@ Expanded by height.
---
// Test relative sizing.
-#let centered(body) = align(center + horizon, body)
#set text(fill: white)
-#rect(width: 100pt, height: 50pt, inset: 0pt, fill: rgb("aaa"), centered[
- #circle(radius: 10pt, fill: eastern, centered[A]) // D=20pt
- #circle(height: 60%, fill: eastern, centered[B]) // D=30pt
- #circle(width: 20% + 20pt, fill: eastern, centered[C]) // D=40pt
-])
+#show rect.with(width: 100pt, height: 50pt, inset: 0pt, fill: rgb("aaa"))
+#set align(center + horizon)
+#stack(
+ dir: ltr,
+ spacing: 1fr,
+ 1fr,
+ circle(radius: 10pt, fill: eastern, [A]), // D=20pt
+ circle(height: 60%, fill: eastern, [B]), // D=30pt
+ circle(width: 20% + 20pt, fill: eastern, [C]), // D=40pt
+ 1fr,
+)
---
// Radius wins over width and height.
diff --git a/tests/typ/visualize/shape-ellipse.typ b/tests/typ/visualize/shape-ellipse.typ
index 6447d1d0..2fd4acd9 100644
--- a/tests/typ/visualize/shape-ellipse.typ
+++ b/tests/typ/visualize/shape-ellipse.typ
@@ -8,7 +8,7 @@
#set rect(inset: 0pt)
#set ellipse(inset: 0pt)
-Rect in ellipse in fixed rect. \
+Rect in ellipse in fixed rect.
#rect(width: 3cm, height: 2cm, fill: rgb("2a631a"),
ellipse(fill: forest, width: 100%, height: 100%,
rect(fill: conifer, width: 100%, height: 100%,
@@ -19,11 +19,13 @@ Rect in ellipse in fixed rect. \
)
)
-Auto-sized ellipse. \
+Auto-sized ellipse.
#ellipse(fill: conifer, stroke: 3pt + forest, inset: 3pt)[
#set text(8pt)
But, soft! what light through yonder window breaks?
]
-An inline #ellipse(width: 8pt, height: 6pt, outset: (top: 3pt, rest: 5.5pt)) ellipse.
+An inline
+#box(ellipse(width: 8pt, height: 6pt, outset: (top: 3pt, rest: 5.5pt)))
+ellipse.
diff --git a/tests/typ/visualize/shape-fill-stroke.typ b/tests/typ/visualize/shape-fill-stroke.typ
index 8820a9fd..0edbd551 100644
--- a/tests/typ/visualize/shape-fill-stroke.typ
+++ b/tests/typ/visualize/shape-fill-stroke.typ
@@ -27,7 +27,7 @@
---
// Test stroke folding.
-#let sq = square.with(size: 10pt)
+#let sq(..args) = box(square(size: 10pt, ..args))
#set square(stroke: none)
#sq()
diff --git a/tests/typ/visualize/shape-rect.typ b/tests/typ/visualize/shape-rect.typ
index ff80dfb9..a95f2750 100644
--- a/tests/typ/visualize/shape-rect.typ
+++ b/tests/typ/visualize/shape-rect.typ
@@ -24,19 +24,23 @@
#rect(height: 1cm, width: 100%, fill: rgb("734ced"))[Topleft]
// These are inline with text.
-{#rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67"))
- #rect(width: 0.5in, height: 7pt, fill: rgb("edd466"))
- #rect(width: 0.5in, height: 7pt, fill: rgb("e3be62"))}
+{#box(rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67")))
+ #box(rect(width: 0.5in, height: 7pt, fill: rgb("edd466")))
+ #box(rect(width: 0.5in, height: 7pt, fill: rgb("e3be62")))}
// Rounded corners.
-#rect(width: 2cm, radius: 60%)
-#rect(width: 1cm, radius: (left: 10pt, right: 5pt))
-#rect(width: 1.25cm, radius: (
- top-left: 2pt,
- top-right: 5pt,
- bottom-right: 8pt,
- bottom-left: 11pt
-))
+#stack(
+ dir: ltr,
+ spacing: 1fr,
+ rect(width: 2cm, radius: 60%),
+ rect(width: 1cm, radius: (left: 10pt, right: 5pt)),
+ rect(width: 1.25cm, radius: (
+ top-left: 2pt,
+ top-right: 5pt,
+ bottom-right: 8pt,
+ bottom-left: 11pt
+ )),
+)
// Different strokes.
#set rect(stroke: (right: red))
diff --git a/tests/typ/visualize/shape-square.typ b/tests/typ/visualize/shape-square.typ
index 8ac9001f..cb6552e4 100644
--- a/tests/typ/visualize/shape-square.typ
+++ b/tests/typ/visualize/shape-square.typ
@@ -2,8 +2,8 @@
---
// Default square.
-#square()
-#square[hey!]
+#box(square())
+#box(square[hey!])
---
// Test auto-sized square.
@@ -15,7 +15,7 @@
---
// Test relative-sized child.
#square(fill: eastern)[
- #rect(width: 10pt, height: 5pt, fill: conifer) \
+ #rect(width: 10pt, height: 5pt, fill: conifer)
#rect(width: 40%, height: 5pt, stroke: conifer)
]