diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tests/typ/compiler/show-node.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/typ/compiler/show-node.typ')
| -rw-r--r-- | tests/typ/compiler/show-node.typ | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ deleted file mode 100644 index ff2bdb5a..00000000 --- a/tests/typ/compiler/show-node.typ +++ /dev/null @@ -1,104 +0,0 @@ -// Test show rules. - ---- -// Override lists. -#show list: it => "(" + it.children.map(v => v.body).join(", ") + ")" - -- A - - B - - C -- D -- E - ---- -// Test full reset. -#show heading: [B] -#show heading: set text(size: 10pt, weight: 400) -A #[= Heading] C - ---- -// Test full removal. -#show heading: none - -Where is -= There are no headings around here! -my heading? - ---- -// Test integrated example. -#show heading: it => block({ - set text(10pt) - box(move(dy: -1pt)[📖]) - h(5pt) - if it.level == 1 { - underline(text(1.25em, blue, it.body)) - } else { - text(red, it.body) - } -}) - -= Task 1 -Some text. - -== Subtask -Some more text. - -= Task 2 -Another text. - ---- -// Test set and show in code blocks. -#show heading: it => { - set text(red) - show "ding": [🛎] - it.body -} - -= Heading - ---- -// Test that scoping works as expected. -#{ - let world = [ World ] - show "W": strong - world - { - set text(blue) - show: it => { - show "o": "Ø" - it - } - world - } - world -} - ---- -#show heading: [1234] -= Heading - ---- -// Error: 25-29 content does not contain field "page" -#show heading: it => it.page -= Heading - ---- -#show text: none -Hey - ---- -// Error: 7-12 only element functions can be used as selectors -#show upper: it => {} - ---- -// Error: 16-20 expected content or function, found integer -#show heading: 1234 -= Heading - ---- -// Error: 7-10 expected symbol, string, label, function, regex, or selector, found color -#show red: [] - ---- -// Error: 7-25 show is only allowed directly in code and content blocks -#(1 + show heading: none) |
