typst/tests/typ/bugs/layout-infinite-lengths.typ
Sébastien d'Herbais de Thun c4d9b0c3d8
New performance timings (#3096)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
2023-12-30 12:36:15 +00:00

26 lines
707 B
Typst

// Test that passing infinite lengths to drawing primitives does not crash Typst.
---
#set page(width: auto, height: auto)
// Error: 58-59 cannot expand into infinite width
#layout(size => grid(columns: (size.width, size.height))[a][b][c][d])
---
#set page(width: auto, height: auto)
// Error: 17-66 cannot create grid with infinite height
#layout(size => grid(rows: (size.width, size.height))[a][b][c][d])
---
#set page(width: auto, height: auto)
// Error: 17-41 cannot create line with infinite length
#layout(size => line(length: size.width))
---
#set page(width: auto, height: auto)
// Error: 17-54 cannot create polygon with infinite size
#layout(size => polygon((0pt,0pt), (0pt, size.width)))