diff options
Diffstat (limited to 'tests/suite/visualize/square.typ')
| -rw-r--r-- | tests/suite/visualize/square.typ | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tests/suite/visualize/square.typ b/tests/suite/visualize/square.typ index b346561d..bb7bbd9d 100644 --- a/tests/suite/visualize/square.typ +++ b/tests/suite/visualize/square.typ @@ -77,11 +77,25 @@ #set page(width: 20pt, height: 10pt, margin: 0pt) #stack(dir: ltr, square(fill: forest), square(fill: conifer)) ---- square-overflow --- +--- square-no-overflow --- // 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] +#square() +#square[Hello there] + +--- square-overflow-forced-width --- +// Test that a width-overflowing square is laid out regardless of the +// presence of inner content. +#set page(width: 60pt, height: 100pt) +#square(width: 150%) +#square(width: 150%)[Hello there] + +--- square-overflow-forced-height --- +// Test that a height-overflowing square is laid out regardless of the +// presence of inner content. +#set page(width: 120pt, height: 60pt) +#square(height: 150%) +#square(height: 150%)[Hello there] --- square-size-relative-invalid --- // Size cannot be relative because we wouldn't know @@ -144,3 +158,10 @@ // Test that square sets correct base for its content. #set page(height: 80pt) #square(width: 40%, rect(width: 60%, height: 80%)) + +--- square-size-beyond-default --- +// Test that setting a square's height beyond its default sizes it correctly. +#square() +#square(height: 60pt) +#square(width: 60pt) +#square(size: 60pt) |
