diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-10 17:22:44 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-10 17:22:44 +0100 |
| commit | b0446cbdd189a8cc3b6a7321579f4aa89415a8e0 (patch) | |
| tree | 821140ec6526750ba50715bd2e471376eb37ee29 /tests | |
| parent | bbb9ed07ffe8a2a0ea0a232f6cfc52f82f7f7afe (diff) | |
Move around library types 🚚
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/library/shapes.png (renamed from tests/ref/library/box.png) | bin | 2510 -> 2510 bytes | |||
| -rw-r--r-- | tests/ref/library/spacing.png (renamed from tests/ref/library/hv.png) | bin | 3960 -> 3960 bytes | |||
| -rw-r--r-- | tests/typ/library/base.typ | 25 | ||||
| -rw-r--r-- | tests/typ/library/font.typ | 2 | ||||
| -rw-r--r-- | tests/typ/library/image.typ | 2 | ||||
| -rw-r--r-- | tests/typ/library/page.typ | 2 | ||||
| -rw-r--r-- | tests/typ/library/pagebreak.typ | 2 | ||||
| -rw-r--r-- | tests/typ/library/rgb.typ | 23 | ||||
| -rw-r--r-- | tests/typ/library/shapes.typ (renamed from tests/typ/library/box.typ) | 2 | ||||
| -rw-r--r-- | tests/typ/library/spacing.typ (renamed from tests/typ/library/hv.typ) | 2 |
10 files changed, 31 insertions, 29 deletions
diff --git a/tests/ref/library/box.png b/tests/ref/library/shapes.png Binary files differindex 2804f8e9..2804f8e9 100644 --- a/tests/ref/library/box.png +++ b/tests/ref/library/shapes.png diff --git a/tests/ref/library/hv.png b/tests/ref/library/spacing.png Binary files differindex 0842d409..0842d409 100644 --- a/tests/ref/library/hv.png +++ b/tests/ref/library/spacing.png diff --git a/tests/typ/library/base.typ b/tests/typ/library/base.typ new file mode 100644 index 00000000..000a80ea --- /dev/null +++ b/tests/typ/library/base.typ @@ -0,0 +1,25 @@ +// Test the base functions. +// Ref: false + +--- +#test(type("hi"), "string") +#test(repr([Hi #box[there]]), "[Hi [<node box>]]") + +--- +// Check the output. +#test(rgb(0.0, 0.3, 0.7), #004db3) + +// Alpha channel. +#test(rgb(1.0, 0.0, 0.0, 0.5), #ff000080) + +// Warning: 2:11-2:14 should be between 0.0 and 1.0 +// Warning: 1:16-1:20 should be between 0.0 and 1.0 +#test(rgb(-30, 15.5, 0.5), #00ff80) + +// Error: 11-15 missing argument: blue component +#test(rgb(0, 1), #00ff00) + +// Error: 3:11-3:11 missing argument: red component +// Error: 2:11-2:11 missing argument: green component +// Error: 1:11-1:11 missing argument: blue component +#test(rgb(), #000000) diff --git a/tests/typ/library/font.typ b/tests/typ/library/font.typ index 157557fe..566f2e87 100644 --- a/tests/typ/library/font.typ +++ b/tests/typ/library/font.typ @@ -1,4 +1,4 @@ -// Test the font function. +// Test the `font` function. --- // Test configuring font properties. diff --git a/tests/typ/library/image.typ b/tests/typ/library/image.typ index d3e6c78d..a5737f4f 100644 --- a/tests/typ/library/image.typ +++ b/tests/typ/library/image.typ @@ -1,4 +1,4 @@ -// Test the image function. +// Test the `image` function. --- // Test loading different image formats. diff --git a/tests/typ/library/page.typ b/tests/typ/library/page.typ index 1f16f009..ac222e04 100644 --- a/tests/typ/library/page.typ +++ b/tests/typ/library/page.typ @@ -1,4 +1,4 @@ -// Test the page function. +// Test the `page` function. --- // Test configuring page sizes and margins. diff --git a/tests/typ/library/pagebreak.typ b/tests/typ/library/pagebreak.typ index 22af9512..37a544cf 100644 --- a/tests/typ/library/pagebreak.typ +++ b/tests/typ/library/pagebreak.typ @@ -1,4 +1,4 @@ -// Test the pagebreak function. +// Test the `pagebreak` function. --- First of two diff --git a/tests/typ/library/rgb.typ b/tests/typ/library/rgb.typ deleted file mode 100644 index 62a1627c..00000000 --- a/tests/typ/library/rgb.typ +++ /dev/null @@ -1,23 +0,0 @@ -// Test the rgb function. -// Ref: false - ---- -{ - // Check the output. - test(rgb(0.0, 0.3, 0.7), #004db3) - - // Alpha channel. - test(rgb(1.0, 0.0, 0.0, 0.5), #ff000080) - - // Warning: 2:14-2:17 should be between 0.0 and 1.0 - // Warning: 1:19-1:23 should be between 0.0 and 1.0 - test(rgb(-30, 15.5, 0.5), #00ff80) - - // Error: 14-18 missing argument: blue component - test(rgb(0, 1), #00ff00) - - // Error: 3:14-3:14 missing argument: red component - // Error: 2:14-2:14 missing argument: green component - // Error: 1:14-1:14 missing argument: blue component - test(rgb(), #000000) -} diff --git a/tests/typ/library/box.typ b/tests/typ/library/shapes.typ index 7ce56859..ceaa0148 100644 --- a/tests/typ/library/box.typ +++ b/tests/typ/library/shapes.typ @@ -1,4 +1,4 @@ -// Test the box function. +// Test shapes. --- #page("a8", flip: true) diff --git a/tests/typ/library/hv.typ b/tests/typ/library/spacing.typ index 09132a60..a34840c6 100644 --- a/tests/typ/library/hv.typ +++ b/tests/typ/library/spacing.typ @@ -1,4 +1,4 @@ -// Test the h and v functions. +// Test the `h` and `v` functions. --- // Ends paragraphs. |
