diff options
| author | Max <me@mkor.je> | 2024-11-26 12:39:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 12:39:00 +0000 |
| commit | 39e41ba3c6e8b78324f30b6513c81f31b84472d9 (patch) | |
| tree | 259c915dcdcba67437f878f427b3d7b2ff992ce0 /tests | |
| parent | fd5e642fb495e98bde0f7e7fd16dca7ac355c60a (diff) | |
Fix `path` with infinite length causing panic (#5457)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/suite/visualize/line.typ | 4 | ||||
| -rw-r--r-- | tests/suite/visualize/path.typ | 4 | ||||
| -rw-r--r-- | tests/suite/visualize/polygon.typ | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/suite/visualize/line.typ b/tests/suite/visualize/line.typ index 7259f72b..6cbbbb49 100644 --- a/tests/suite/visualize/line.typ +++ b/tests/suite/visualize/line.typ @@ -90,3 +90,7 @@ --- line-bad-point-component-type --- // Error: 14-26 expected relative length, found angle #line(start: (3deg, 10pt), length: 5cm) + +--- line-infinite-length --- +// Error: 2-54 cannot create line with infinite length +#line(start: (0pt, 0pt), end: (float.inf * 1pt, 0pt)) diff --git a/tests/suite/visualize/path.typ b/tests/suite/visualize/path.typ index 95f7a803..55c0f534 100644 --- a/tests/suite/visualize/path.typ +++ b/tests/suite/visualize/path.typ @@ -71,6 +71,10 @@ // Error: 7-31 point array must contain exactly two entries #path(((0%, 0%), (0%, 0%, 0%))) +--- path-infinite-length --- +// Error: 2-42 cannot create path with infinite length +#path((0pt, 0pt), (float.inf * 1pt, 0pt)) + --- issue-path-in-sized-container --- // Paths used to implement `LayoutMultiple` rather than `LayoutSingle` without // fulfilling the necessary contract of respecting region expansion. diff --git a/tests/suite/visualize/polygon.typ b/tests/suite/visualize/polygon.typ index 7d8342c8..ec27194d 100644 --- a/tests/suite/visualize/polygon.typ +++ b/tests/suite/visualize/polygon.typ @@ -51,3 +51,7 @@ --- polygon-bad-point-array --- // Error: 10-17 point array must contain exactly two entries #polygon((50pt,)) + +--- polygon-infinite-size --- +// Error: 2-57 cannot create polygon with infinite size +#polygon((0pt, 0pt), (0pt, 1pt), (float.inf * 1pt, 0pt)) |
