From 0579fd4409375aaa9fd8e87a06fd59097b5fcd97 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 26 Nov 2022 16:59:20 +0100 Subject: Reorganize library base --- tests/ref/base/numbering.png | Bin 10634 -> 7112 bytes tests/ref/base/string.png | Bin 10614 -> 0 bytes tests/typ/base/color.typ | 2 +- tests/typ/base/numbering.typ | 13 +++++++++++++ tests/typ/base/string.typ | 21 --------------------- tests/typ/structure/enum.typ | 4 ++-- 6 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 tests/ref/base/string.png create mode 100644 tests/typ/base/numbering.typ (limited to 'tests') diff --git a/tests/ref/base/numbering.png b/tests/ref/base/numbering.png index d4d575d9..aa34de29 100644 Binary files a/tests/ref/base/numbering.png and b/tests/ref/base/numbering.png differ diff --git a/tests/ref/base/string.png b/tests/ref/base/string.png deleted file mode 100644 index 02184316..00000000 Binary files a/tests/ref/base/string.png and /dev/null differ diff --git a/tests/typ/base/color.typ b/tests/typ/base/color.typ index 96d76063..aecd86b8 100644 --- a/tests/typ/base/color.typ +++ b/tests/typ/base/color.typ @@ -1,4 +1,4 @@ -// Test color creation functions. +// Test color creation functions and modification methods. // Ref: false --- diff --git a/tests/typ/base/numbering.typ b/tests/typ/base/numbering.typ new file mode 100644 index 00000000..200850bc --- /dev/null +++ b/tests/typ/base/numbering.typ @@ -0,0 +1,13 @@ +// Test integrated numbering patterns. + +--- +#for i in range(9) { + numbering(i, "* and ") + numbering(i, "I") + [ for #i] + parbreak() +} + +--- +// Error: 12-14 must be at least zero +#numbering(-1, "1") diff --git a/tests/typ/base/string.typ b/tests/typ/base/string.typ index 3104a3ea..e724f563 100644 --- a/tests/typ/base/string.typ +++ b/tests/typ/base/string.typ @@ -135,27 +135,6 @@ #test(upper(memes), "ARE MEMES GREAT?") #test(upper("Ελλάδα"), "ΕΛΛΆΔΑ") ---- -// Test integrated lower, upper and symbols. -// Ref: true - -#upper("Abc 8") -#upper[def] - -#lower("SCREAMING MUST BE SILENCED in " + roman(1672) + " years") - -#for i in range(9) { - symbol(i) - [ and ] - roman(i) - [ for #i] - parbreak() -} - --- // Error: 8-9 expected string or content, found integer #upper(1) - ---- -// Error: 9-11 must be at least zero -#symbol(-1) diff --git a/tests/typ/structure/enum.typ b/tests/typ/structure/enum.typ index 40aad625..d4c30385 100644 --- a/tests/typ/structure/enum.typ +++ b/tests/typ/structure/enum.typ @@ -12,7 +12,7 @@ --- // Test automatic numbering in summed content. #for i in range(5) { - [+ #roman(1 + i)] + [+ #numbering(1 + i, "I")] } --- @@ -42,7 +42,7 @@ start: 4, spacing: 0.65em - 3pt, tight: false, - label: n => text(fill: (red, green, blue)(mod(n, 3)), [#upper(letter(n))]), + label: n => text(fill: (red, green, blue)(mod(n, 3)), numbering(n, "A")), [Red], [Green], [Blue], ) -- cgit v1.2.3