summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-21 17:12:16 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-21 17:12:16 +0100
commitdd9c323941260a1d08d5113dbefa023713f553da (patch)
tree48c813c01a83f5c6ca67ebbabd041c0298eb0da2 /tests
parentc28d2130ddda3ae9b25cc16c3015087990ccb6e9 (diff)
Show with set
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/structure/attach.typ2
-rw-r--r--tests/typ/style/construct.typ2
-rw-r--r--tests/typ/style/label.typ8
-rw-r--r--tests/typ/style/show-node.typ2
-rw-r--r--tests/typ/style/show-selector.typ6
-rw-r--r--tests/typ/text/indent.typ2
-rw-r--r--tests/typ/text/par.typ11
7 files changed, 16 insertions, 17 deletions
diff --git a/tests/typ/structure/attach.typ b/tests/typ/structure/attach.typ
index c13de236..9d043eb0 100644
--- a/tests/typ/structure/attach.typ
+++ b/tests/typ/structure/attach.typ
@@ -10,7 +10,7 @@ Next paragraph.
---
// Test that attached list isn't affected by block spacing.
-#show list: it => { set block(above: 100pt); it }
+#show list: set block(above: 100pt)
Hello
- A
World
diff --git a/tests/typ/style/construct.typ b/tests/typ/style/construct.typ
index be11e97e..f535184c 100644
--- a/tests/typ/style/construct.typ
+++ b/tests/typ/style/construct.typ
@@ -27,5 +27,5 @@ A #rect(fill: yellow, inset: 5pt, rect()) B
---
// The constructor property should still work
// when there are recursive show rules.
-#show list: text.with(blue)
+#show list: set text(blue)
#list(label: "(a)", [A], list[B])
diff --git a/tests/typ/style/label.typ b/tests/typ/style/label.typ
index 0b667783..3ce0c02c 100644
--- a/tests/typ/style/label.typ
+++ b/tests/typ/style/label.typ
@@ -2,7 +2,7 @@
---
// Test labelled headings.
-#show heading: text.with(10pt)
+#show heading: set text(10pt)
#show heading.where(label: "intro"): underline
= Introduction <intro>
@@ -13,7 +13,7 @@ The end.
---
// Test label after expression.
-#show strong.where(label: "v"): text.with(red)
+#show strong.where(label: "v"): set text(red)
#let a = [*A*]
#let b = [*B*]
@@ -30,8 +30,8 @@ This is a thing [that <last>] happened.
---
// Test abusing labels for styling.
-#show strong.where(label: "red"): text.with(red)
-#show strong.where(label: "blue"): text.with(blue)
+#show strong.where(label: "red"): set text(red)
+#show strong.where(label: "blue"): set text(blue)
*A* *B* <red> *C* <blue> *D*
diff --git a/tests/typ/style/show-node.typ b/tests/typ/style/show-node.typ
index 51b4734e..0124e61c 100644
--- a/tests/typ/style/show-node.typ
+++ b/tests/typ/style/show-node.typ
@@ -13,7 +13,7 @@
---
// Test full reset.
#show heading: [B]
-#show heading: text.with(size: 10pt, weight: 400)
+#show heading: set text(size: 10pt, weight: 400)
A [= Heading] C
---
diff --git a/tests/typ/style/show-selector.typ b/tests/typ/style/show-selector.typ
index ed8c0d8e..0e9823a5 100644
--- a/tests/typ/style/show-selector.typ
+++ b/tests/typ/style/show-selector.typ
@@ -28,9 +28,9 @@ code!("it");
```
---
-#show heading.where(level: 1): text.with(red)
-#show heading.where(level: 2): text.with(blue)
-#show heading: text.with(green)
+#show heading.where(level: 1): set text(red)
+#show heading.where(level: 2): set text(blue)
+#show heading: set text(green)
= Red
== Blue
=== Green
diff --git a/tests/typ/text/indent.typ b/tests/typ/text/indent.typ
index b2f3d87b..8454dda5 100644
--- a/tests/typ/text/indent.typ
+++ b/tests/typ/text/indent.typ
@@ -3,7 +3,7 @@
---
#set par(indent: 12pt, leading: 5pt)
#set block(spacing: 5pt)
-#show heading: text.with(size: 10pt)
+#show heading: set text(size: 10pt)
The first paragraph has no indent.
diff --git a/tests/typ/text/par.typ b/tests/typ/text/par.typ
index 56a33577..558059e9 100644
--- a/tests/typ/text/par.typ
+++ b/tests/typ/text/par.typ
@@ -16,18 +16,17 @@ It is the east, and Juliet is the sun.
---
// Test that paragraph spacing loses against block spacing.
// TODO
-// #set block(spacing: 100pt)
-// #show table: set block(spacing: 5pt)
-#set block(spacing: 5pt)
+#set block(spacing: 100pt)
+#show table: set block(above: 5pt, below: 5pt)
Hello
#table(columns: 4, fill: (x, y) => if odd(x + y) { silver })[A][B][C][D]
---
// While we're at it, test the larger block spacing wins.
#set block(spacing: 0pt)
-#show raw: it => { set block(spacing: 15pt); it }
-#show math: it => { set block(spacing: 7.5pt); it }
-#show list: it => { set block(spacing: 2.5pt); it }
+#show raw: set block(spacing: 15pt)
+#show math: set block(spacing: 7.5pt)
+#show list: set block(spacing: 2.5pt)
```rust
fn main() {}