summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-05 19:55:15 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-05 19:55:15 +0200
commit3d0dcbea182f6a81539c12c9d5156cf0f6863b67 (patch)
tree36a37fb5e39db8ca13f83ca362d01c0e0a9fdffa /tests/typ
parent25b053ed93a6cbffceb52b790d013d69dc2a31c2 (diff)
Error on out-of-range values in `rgb`
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/utility/color.typ11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/typ/utility/color.typ b/tests/typ/utility/color.typ
index 1e16c0a6..31d3dae8 100644
--- a/tests/typ/utility/color.typ
+++ b/tests/typ/utility/color.typ
@@ -8,8 +8,15 @@
// Alpha channel.
#test(rgb(1.0, 0.0, 0.0, 0.5), rgb("ff000080"))
-// Clamped.
-#test(rgb(-30, 15.5, 0.5), rgb("00ff80"))
+---
+// Error for values that are out of range.
+// Error: 11-14 value must be between 0.0 and 1.0
+#test(rgb(-30, 15.5, 0.5))
+
+---
+// Error for values that are out of range.
+// Error: 26-30 value must be between 0.0 and 1.0
+#test(rgb(0.1, 0.2, 0.3, -0.1))
---
// Error: 6-11 invalid color