diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/block-consistent-width.png | bin | 0 -> 870 bytes | |||
| -rw-r--r-- | tests/ref/flow-first-region-zero-sized-item.png | bin | 879 -> 881 bytes | |||
| -rw-r--r-- | tests/ref/gradient-linear-relative-parent-block.png | bin | 0 -> 327 bytes | |||
| -rw-r--r-- | tests/ref/square-circle-overspecified.png | bin | 321 -> 333 bytes | |||
| -rw-r--r-- | tests/ref/square-overflow.png | bin | 305 -> 289 bytes | |||
| -rw-r--r-- | tests/suite/layout/container.typ | 12 | ||||
| -rw-r--r-- | tests/suite/layout/flow/invisibles.typ | 2 | ||||
| -rw-r--r-- | tests/suite/visualize/gradient.typ | 28 | ||||
| -rw-r--r-- | tests/suite/visualize/square.typ | 2 |
9 files changed, 39 insertions, 5 deletions
diff --git a/tests/ref/block-consistent-width.png b/tests/ref/block-consistent-width.png Binary files differnew file mode 100644 index 00000000..70539956 --- /dev/null +++ b/tests/ref/block-consistent-width.png diff --git a/tests/ref/flow-first-region-zero-sized-item.png b/tests/ref/flow-first-region-zero-sized-item.png Binary files differindex 2e75fcfe..2a7121d6 100644 --- a/tests/ref/flow-first-region-zero-sized-item.png +++ b/tests/ref/flow-first-region-zero-sized-item.png diff --git a/tests/ref/gradient-linear-relative-parent-block.png b/tests/ref/gradient-linear-relative-parent-block.png Binary files differnew file mode 100644 index 00000000..e618082d --- /dev/null +++ b/tests/ref/gradient-linear-relative-parent-block.png diff --git a/tests/ref/square-circle-overspecified.png b/tests/ref/square-circle-overspecified.png Binary files differindex 6dde5e51..6dcbdda8 100644 --- a/tests/ref/square-circle-overspecified.png +++ b/tests/ref/square-circle-overspecified.png diff --git a/tests/ref/square-overflow.png b/tests/ref/square-overflow.png Binary files differindex 6169f305..118afe2d 100644 --- a/tests/ref/square-overflow.png +++ b/tests/ref/square-overflow.png diff --git a/tests/suite/layout/container.typ b/tests/suite/layout/container.typ index 2479a44c..b6d30f30 100644 --- a/tests/suite/layout/container.typ +++ b/tests/suite/layout/container.typ @@ -96,6 +96,18 @@ Paragraph lorem(8) + colbreak(), ) +--- block-consistent-width --- +// Test that block enforces consistent width across regions. Also use some +// introspection to check that measurement is working correctly. +#block(stroke: 1pt, inset: 5pt)[ + #align(right)[Hi] + #colbreak() + Hello @netwok +] + +#show bibliography: none +#bibliography("/assets/bib/works.bib") + --- box-clip-rect --- // Test box clipping with a rectangle Hello #box(width: 1em, height: 1em, clip: false)[#rect(width: 3em, height: 3em, fill: red)] diff --git a/tests/suite/layout/flow/invisibles.typ b/tests/suite/layout/flow/invisibles.typ index 7e460373..28118cb9 100644 --- a/tests/suite/layout/flow/invisibles.typ +++ b/tests/suite/layout/flow/invisibles.typ @@ -31,7 +31,7 @@ Placed item in the first region. // In-flow item with size zero in the first region. #set page(height: 5cm, margin: 1cm) In-flow, zero-sized item. -#block(breakable: true, stroke: 1pt, inset: 0.5cm)[ +#block(breakable: true, stroke: 1pt, inset: 0.4cm)[ #set block(spacing: 0pt) #line(length: 0pt) #rect(height: 2cm, fill: gray) diff --git a/tests/suite/visualize/gradient.typ b/tests/suite/visualize/gradient.typ index 1ee5489a..c3794150 100644 --- a/tests/suite/visualize/gradient.typ +++ b/tests/suite/visualize/gradient.typ @@ -45,11 +45,10 @@ fill: gradient.linear(red, purple, space: color.hsl) ) - --- gradient-linear-relative-parent --- // The image should look as if there is a single gradient that is being used for // both the page and the rectangles. -#let grad = gradient.linear(red, blue, green, purple, relative: "parent"); +#let grad = gradient.linear(red, blue, green, purple, relative: "parent") #let my-rect = rect(width: 50%, height: 50%, fill: grad) #set page( height: 50pt, @@ -64,7 +63,7 @@ --- gradient-linear-relative-self --- // The image should look as if there are multiple gradients, one for each // rectangle. -#let grad = gradient.linear(red, blue, green, purple, relative: "self"); +#let grad = gradient.linear(red, blue, green, purple, relative: "self") #let my-rect = rect(width: 50%, height: 50%, fill: grad) #set page( height: 50pt, @@ -76,6 +75,29 @@ #place(top + right, my-rect) #place(bottom + center, rotate(45deg, my-rect)) +--- gradient-linear-relative-parent-block --- +// The image should look as if there are two nested gradients, one for the page +// and one for a nested block. The rotated rectangles are not visible because +// they are relative to the block. +#let grad = gradient.linear(red, blue, green, purple, relative: "parent") +#let my-rect = rect(width: 50%, height: 50%, fill: grad) +#set page( + height: 50pt, + width: 50pt, + margin: 5pt, + fill: grad, + background: place(top + left, my-rect), +) +#block( + width: 40pt, + height: 40pt, + inset: 2.5pt, + fill: grad, +)[ + #place(top + right, my-rect) + #place(bottom + center, rotate(45deg, my-rect)) +] + --- gradient-linear-repeat-and-mirror-1 --- // Test repeated gradients. #rect( diff --git a/tests/suite/visualize/square.typ b/tests/suite/visualize/square.typ index caa1fc21..b346561d 100644 --- a/tests/suite/visualize/square.typ +++ b/tests/suite/visualize/square.typ @@ -69,7 +69,7 @@ dir: ltr, spacing: 2pt, square(width: 20pt, height: 40pt), - circle(width: 20%, height: 100pt), + circle(width: 20%, height: 40pt), ) --- square-height-limited-stack --- |
