diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-10 16:46:01 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-10 16:46:01 +0200 |
| commit | 5611c26577c4cf6d52b9b66b7b1a32253aa23ec1 (patch) | |
| tree | b06a64845ef691700aed7fd0ed1e22dd064cc742 /tests/typ/insert/square.typ | |
| parent | bce553a991f19b2b5bb9efef6b74bd12e15a10c6 (diff) | |
Restructure tests
Diffstat (limited to 'tests/typ/insert/square.typ')
| -rw-r--r-- | tests/typ/insert/square.typ | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/typ/insert/square.typ b/tests/typ/insert/square.typ new file mode 100644 index 00000000..649d31c0 --- /dev/null +++ b/tests/typ/insert/square.typ @@ -0,0 +1,31 @@ +// Test the `square` function. + +--- +Auto-sized square. \ +#square(fill: eastern)[ + #align(center) + #pad(5pt)[ + #font(color: #fff, weight: bold) + Typst + ] +] + +--- +// Length wins over width and height. +// Error: 2:9-2:20 unexpected argument +// Error: 1:22-1:34 unexpected argument +#square(width: 10cm, height: 20cm, length: 1cm, fill: #eb5278) + +--- +// Test height overflow. +#page(width: 75pt, height: 100pt) +#square(fill: conifer)[ + But, soft! what light through yonder window breaks? +] + +--- +// Test width overflow. +#page(width: 100pt, height: 75pt) +#square(fill: conifer)[ + But, soft! what light through yonder window breaks? +] |
