diff --git a/tests/ref/library/rgb.png b/tests/ref/library/rgb.png deleted file mode 100644 index 37aef599f..000000000 Binary files a/tests/ref/library/rgb.png and /dev/null differ diff --git a/tests/typ/expr/call.typ b/tests/typ/expr/call.typ index 358322d12..0e941124c 100644 --- a/tests/typ/expr/call.typ +++ b/tests/typ/expr/call.typ @@ -54,7 +54,6 @@ --- // Different forms of template arguments. -// Ref: true #let a = "a" diff --git a/tests/typ/expr/closure.typ b/tests/typ/expr/closure.typ index d05acaa44..86a6f6328 100644 --- a/tests/typ/expr/closure.typ +++ b/tests/typ/expr/closure.typ @@ -1,7 +1,7 @@ // Test closures. +// Ref: false --- -// Ref: false // Basic closure without captures. { @@ -45,8 +45,6 @@ } --- -// Ref: false - // Too few arguments. { let types(x, y) = "[" + type(x) + ", " + type(y) + "]" diff --git a/tests/typ/library/box.typ b/tests/typ/library/box.typ index eff0be3d8..10e2c93e9 100644 --- a/tests/typ/library/box.typ +++ b/tests/typ/library/box.typ @@ -1,3 +1,6 @@ +// Test the box function. + +--- #page("a7", flip: true) // Box with fixed width, should have text height. diff --git a/tests/typ/library/font.typ b/tests/typ/library/font.typ index 165bdc10d..157557fed 100644 --- a/tests/typ/library/font.typ +++ b/tests/typ/library/font.typ @@ -1,3 +1,6 @@ +// Test the font function. + +--- // Test configuring font properties. // Set same font size in three different ways. diff --git a/tests/typ/library/hv.typ b/tests/typ/library/hv.typ index 154445cfc..09132a60b 100644 --- a/tests/typ/library/hv.typ +++ b/tests/typ/library/hv.typ @@ -1,3 +1,6 @@ +// Test the h and v functions. + +--- // Ends paragraphs. Tightly #v(-5pt) packed diff --git a/tests/typ/library/image.typ b/tests/typ/library/image.typ index 9c3cd4fe2..d3e6c78da 100644 --- a/tests/typ/library/image.typ +++ b/tests/typ/library/image.typ @@ -1,3 +1,6 @@ +// Test the image function. + +--- // Test loading different image formats. // Load an RGBA PNG image. diff --git a/tests/typ/library/page.typ b/tests/typ/library/page.typ index b7ac03484..1f16f009d 100644 --- a/tests/typ/library/page.typ +++ b/tests/typ/library/page.typ @@ -1,3 +1,6 @@ +// Test the page function. + +--- // Test configuring page sizes and margins. // Set width and height. diff --git a/tests/typ/library/pagebreak.typ b/tests/typ/library/pagebreak.typ index dc3e5682d..22af95126 100644 --- a/tests/typ/library/pagebreak.typ +++ b/tests/typ/library/pagebreak.typ @@ -1,3 +1,6 @@ +// Test the pagebreak function. + +--- First of two #pagebreak() #page(height: 40pt) diff --git a/tests/typ/library/rgb.typ b/tests/typ/library/rgb.typ index b962bbc06..62a1627cf 100644 --- a/tests/typ/library/rgb.typ +++ b/tests/typ/library/rgb.typ @@ -1,17 +1,23 @@ -// Check the output. -#rgb(0.0, 0.3, 0.7) +// Test the rgb function. +// Ref: false -// Alpha channel. -#rgb(1.0, 0.0, 0.0, 0.5) +--- +{ + // Check the output. + test(rgb(0.0, 0.3, 0.7), #004db3) -// Warning: 2:6-2:9 should be between 0.0 and 1.0 -// Warning: 1:11-1:15 should be between 0.0 and 1.0 -#rgb(-30, 15.5, 0.5) + // Alpha channel. + test(rgb(1.0, 0.0, 0.0, 0.5), #ff000080) -// Error: 6-10 missing argument: blue component -#rgb(0, 1) + // 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: 3:6-3:6 missing argument: red component -// Error: 2:6-2:6 missing argument: green component -// Error: 1:6-1:6 missing argument: blue component -#rgb() + // 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) +}