From 020294fca9a7065d4b9cf4e677f606ebaaa29b00 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 13 Apr 2024 10:39:45 +0200 Subject: Better test runner (#3922) --- tests/suite/visualize/path.typ | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/suite/visualize/path.typ (limited to 'tests/suite/visualize/path.typ') diff --git a/tests/suite/visualize/path.typ b/tests/suite/visualize/path.typ new file mode 100644 index 00000000..10955f14 --- /dev/null +++ b/tests/suite/visualize/path.typ @@ -0,0 +1,52 @@ +// Test paths. + +--- path --- +#set page(height: 200pt, width: 200pt) +#table( + columns: (1fr, 1fr), + rows: (1fr, 1fr), + align: center + horizon, + path( + fill: red, + closed: true, + ((0%, 0%), (4%, -4%)), + ((50%, 50%), (4%, -4%)), + ((0%, 50%), (4%, 4%)), + ((50%, 0%), (4%, 4%)), + ), + path( + fill: purple, + stroke: 1pt, + (0pt, 0pt), + (30pt, 30pt), + (0pt, 30pt), + (30pt, 0pt), + ), + path( + fill: blue, + stroke: 1pt, + closed: true, + ((30%, 0%), (35%, 30%), (-20%, 0%)), + ((30%, 60%), (-20%, 0%), (0%, 0%)), + ((50%, 30%), (60%, -30%), (60%, 0%)), + ), + path( + stroke: 5pt, + closed: true, + (0pt, 30pt), + (30pt, 30pt), + (15pt, 0pt), + ), +) + +--- path-bad-vertex --- +// Error: 7-9 path vertex must have 1, 2, or 3 points +#path(()) + +--- path-bad-point-count --- +// Error: 7-47 path vertex must have 1, 2, or 3 points +#path(((0%, 0%), (0%, 0%), (0%, 0%), (0%, 0%))) + +--- path-bad-point-array --- +// Error: 7-31 point array must contain exactly two entries +#path(((0%, 0%), (0%, 0%, 0%))) -- cgit v1.2.3