From f190d33d0ca024d322668c0cd1df1eca20ed0210 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 13 Mar 2021 14:35:51 +0100 Subject: =?UTF-8?q?Better=20tests=20for=20pad=20function=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ref/library/pad.png | Bin 180 -> 1254 bytes tests/typ/library/pad.typ | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/ref/library/pad.png b/tests/ref/library/pad.png index 46380689..a655061b 100644 Binary files a/tests/ref/library/pad.png and b/tests/ref/library/pad.png differ diff --git a/tests/typ/library/pad.typ b/tests/typ/library/pad.typ index 3ee538c2..c8bfe907 100644 --- a/tests/typ/library/pad.typ +++ b/tests/typ/library/pad.typ @@ -1,3 +1,13 @@ -#box(color: #9feb52)[ - #pad(10pt, box(color: #eb5278, width: 20pt, height: 20pt)) -] +// Test the `pad` function. + +--- +// Use for indentation. +#pad(left: 10pt, [Indented!]) + +// All sides together. +#box(color: #9feb52, + pad(10pt, right: 20pt, + box(color: #eb5278, width: 20pt, height: 20pt))) + +// Error: 13-23 missing argument: body +Hi #box(pad(left: 10pt)) there -- cgit v1.2.3