diff --git a/tests/ref/rect-stroke-caps.png b/tests/ref/rect-stroke-caps.png new file mode 100644 index 000000000..13a34ad9a Binary files /dev/null and b/tests/ref/rect-stroke-caps.png differ diff --git a/tests/suite/visualize/rect.typ b/tests/suite/visualize/rect.typ index a659287e7..ba5792b78 100644 --- a/tests/suite/visualize/rect.typ +++ b/tests/suite/visualize/rect.typ @@ -54,6 +54,22 @@ #v(3pt) #rect(width: 20pt, height: 20pt, stroke: (thickness: 5pt, join: "round")) +--- rect-stroke-caps --- +// Separated segments +#rect(width: 20pt, height: 20pt, stroke: ( + left: (cap: "round", thickness: 5pt), + right: (cap: "square", thickness: 7pt), +)) +// Joined segment with different caps. +#rect(width: 20pt, height: 20pt, stroke: ( + left: (cap: "round", thickness: 5pt), + top: (cap: "square", thickness: 7pt), +)) +// No caps when there is a radius for that corner. +#rect(width: 20pt, height: 20pt, radius: (top: 3pt), stroke: ( + left: (cap: "round", thickness: 5pt), + top: (cap: "square", thickness: 7pt), +)) --- red-stroke-bad-type --- // Error: 15-21 expected length, color, gradient, tiling, dictionary, stroke, none, or auto, found array #rect(stroke: (1, 2))