diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/rgb.typ | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/typ/rgb.typ b/tests/typ/rgb.typ new file mode 100644 index 00000000..44d87819 --- /dev/null +++ b/tests/typ/rgb.typ @@ -0,0 +1,24 @@ +// Test the `rgb` function. + +// Check the output. +[rgb: 0.0, 0.3, 0.7] [val: #004db3] + +// Alpha channel. +[rgb: 1.0, 0.0, 0.0, 0.5] + +// Value smaller than 0.0 and larger than 1.0 +[rgb: -30, 15.5, 0.5] + +// Missing blue component. +[rgb: 0, 1] + +// Missing all components. +[rgb] + +// error: 4:23-4:26 unknown function +// error: 10:7-10:10 should be between 0.0 and 1.0 +// error: 10:12-10:16 should be between 0.0 and 1.0 +// error: 13:7-13:11 missing argument: blue component +// error: 16:5-16:5 missing argument: red component +// error: 16:5-16:5 missing argument: green component +// error: 16:5-16:5 missing argument: blue component |
