summaryrefslogtreecommitdiff
path: root/tests/typ/compiler/show-text.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-04-13 10:39:45 +0200
committerGitHub <noreply@github.com>2024-04-13 08:39:45 +0000
commit020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch)
treec0027ad22046e2726c22298461327823d6b88d53 /tests/typ/compiler/show-text.typ
parent72dd79210602ecc799726fc096b078afbb47f299 (diff)
Better test runner (#3922)
Diffstat (limited to 'tests/typ/compiler/show-text.typ')
-rw-r--r--tests/typ/compiler/show-text.typ93
1 files changed, 0 insertions, 93 deletions
diff --git a/tests/typ/compiler/show-text.typ b/tests/typ/compiler/show-text.typ
deleted file mode 100644
index a42abfb2..00000000
--- a/tests/typ/compiler/show-text.typ
+++ /dev/null
@@ -1,93 +0,0 @@
-// Test text replacement show rules.
-
----
-// Test classic example.
-#set text(font: "Roboto")
-#show "Der Spiegel": smallcaps
-Die Zeitung Der Spiegel existiert.
-
----
-// Another classic example.
-#show "TeX": [T#h(-0.145em)#box(move(dy: 0.233em)[E])#h(-0.135em)X]
-#show regex("(Lua)?(La)?TeX"): name => box(text(font: "New Computer Modern")[#name])
-
-TeX, LaTeX, LuaTeX and LuaLaTeX!
-
----
-// Test direct cycle.
-#show "Hello": text(red)[Hello]
-Hello World!
-
----
-// Test replacing text with raw text.
-#show "rax": `rax`
-The register rax.
-
----
-// Test indirect cycle.
-#show "Good": [Typst!]
-#show "Typst": [Fun!]
-#show "Fun": [Good!]
-
-#set text(ligatures: false)
-Good \
-Fun \
-Typst \
-
----
-// Test that replacements happen exactly once.
-#show "A": [BB]
-#show "B": [CC]
-AA (8)
-
----
-// Test caseless match and word boundaries.
-#show regex("(?i)\bworld\b"): [🌍]
-
-Treeworld, the World of worlds, is a world.
-
----
-// Test there is no crashing on empty strings
-// Error: 1:7-1:9 text selector is empty
-#show "": []
-
----
-// Error: 1:7-1:16 regex selector is empty
-#show regex(""): [AA]
-
----
-// Error: 1:7-1:42 regex matches empty text
-#show regex("(VAR_GLOBAL|END_VAR||BOOL)") : []
-
----
-// This is a fun one.
-#set par(justify: true)
-#show regex("\S"): letter => box(stroke: 1pt, inset: 2pt, upper(letter))
-#lorem(5)
-
----
-// See also: https://github.com/mTvare6/hello-world.rs
-#show regex("(?i)rust"): it => [#it (🚀)]
-Rust is memory-safe and blazingly fast. Let's rewrite everything in rust.
-
----
-// Test accessing the string itself.
-#show "hello": it => it.text.split("").map(upper).join("|")
-Oh, hello there!
-
----
-// Replace worlds but only in lists.
-#show list: it => [
- #show "World": [🌎]
- #it
-]
-
-World
-- World
-
----
-// Test absolute path in layout phase.
-
-#show "GRAPH": image("/assets/images/graph.png")
-
-The GRAPH has nodes.