summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-27 11:54:30 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-27 11:54:30 +0100
commita8fd64f9289b92614b9e6c16e909ec0c45429027 (patch)
tree76ce8797a6fe9c8b8c0bb1783910ba4b9e22da8b /tests
parent33585d9a3fbab8a76d3fd8e9c2560f929202a518 (diff)
Hashtags everywhere!
Diffstat (limited to 'tests')
-rw-r--r--tests/typ/basics/heading.typ4
-rw-r--r--tests/typ/basics/list.typ2
-rw-r--r--tests/typ/compiler/array.typ109
-rw-r--r--tests/typ/compiler/bench.typ2
-rw-r--r--tests/typ/compiler/block.typ52
-rw-r--r--tests/typ/compiler/break-continue.typ4
-rw-r--r--tests/typ/compiler/call.typ22
-rw-r--r--tests/typ/compiler/closure.typ28
-rw-r--r--tests/typ/compiler/construct.typ2
-rw-r--r--tests/typ/compiler/dict.typ42
-rw-r--r--tests/typ/compiler/field.typ16
-rw-r--r--tests/typ/compiler/for.typ8
-rw-r--r--tests/typ/compiler/if.typ10
-rw-r--r--tests/typ/compiler/import.typ4
-rw-r--r--tests/typ/compiler/include.typ4
-rw-r--r--tests/typ/compiler/label.typ4
-rw-r--r--tests/typ/compiler/let.typ4
-rw-r--r--tests/typ/compiler/methods.typ20
-rw-r--r--tests/typ/compiler/ops-invalid.typ108
-rw-r--r--tests/typ/compiler/ops-prec.typ14
-rw-r--r--tests/typ/compiler/ops.typ24
-rw-r--r--tests/typ/compiler/repr.typ44
-rw-r--r--tests/typ/compiler/set.typ12
-rw-r--r--tests/typ/compiler/shorthand.typ2
-rw-r--r--tests/typ/compiler/show-bare.typ6
-rw-r--r--tests/typ/compiler/show-node.typ8
-rw-r--r--tests/typ/compiler/spread.typ22
-rw-r--r--tests/typ/compiler/string.typ16
-rw-r--r--tests/typ/compiler/while.typ10
-rw-r--r--tests/typ/compute/foundations.typ8
-rw-r--r--tests/typ/compute/utility.typ2
-rw-r--r--tests/typ/layout/page-margin.typ12
-rw-r--r--tests/typ/layout/page.typ6
-rw-r--r--tests/typ/layout/pagebreak.typ4
-rw-r--r--tests/typ/layout/par-bidi.typ2
-rw-r--r--tests/typ/layout/par-justify.typ2
-rw-r--r--tests/typ/layout/repeat.typ2
-rw-r--r--tests/typ/layout/transform.typ4
-rw-r--r--tests/typ/math/style.typ8
-rw-r--r--tests/typ/meta/document.typ8
-rw-r--r--tests/typ/meta/outline.typ2
-rw-r--r--tests/typ/text/em.typ4
-rw-r--r--tests/typ/text/emphasis.typ10
-rw-r--r--tests/typ/text/font.typ2
-rw-r--r--tests/typ/text/quotes.typ2
-rw-r--r--tests/typ/text/space.typ8
-rw-r--r--tests/typ/visualize/line.typ8
-rw-r--r--tests/typ/visualize/shape-fill-stroke.typ2
-rw-r--r--tests/typ/visualize/shape-rect.typ12
49 files changed, 355 insertions, 356 deletions
diff --git a/tests/typ/basics/heading.typ b/tests/typ/basics/heading.typ
index 4e9550b9..d843a2e8 100644
--- a/tests/typ/basics/heading.typ
+++ b/tests/typ/basics/heading.typ
@@ -21,7 +21,7 @@ No heading
// Parsed as headings if at start of the context.
/**/ = Level 1
-{[== Level 2]}
+#{[== Level 2]}
#box[=== Level 3]
// Not at the start of the context.
@@ -33,7 +33,7 @@ No = heading
---
// Blocks can continue the heading.
-= [This
+= #[This
is
multiline.
]
diff --git a/tests/typ/basics/list.typ b/tests/typ/basics/list.typ
index b8bd59ea..1c111dcb 100644
--- a/tests/typ/basics/list.typ
+++ b/tests/typ/basics/list.typ
@@ -24,7 +24,7 @@ _Shopping list_
---
- Level 1
- - Level [
+ - Level #[
2 through content block
]
diff --git a/tests/typ/compiler/array.typ b/tests/typ/compiler/array.typ
index e01f8896..3d4d6106 100644
--- a/tests/typ/compiler/array.typ
+++ b/tests/typ/compiler/array.typ
@@ -7,19 +7,19 @@
#set page(width: 150pt)
// Empty.
-{()}
+#{()}
// Not an array, just a parenthesized expression.
-{(1)}
+#{(1)}
// One item and trailing comma.
-{(-1,)}
+#{(-1,)}
// No trailing comma.
-{(true, false)}
+#{(true, false)}
// Multiple lines and items and trailing comma.
-{("1"
+#{("1"
, rgb("002")
,)}
@@ -30,7 +30,7 @@
---
// Test lvalue and rvalue access.
-{
+#{
let array = (1, 2)
array.at(1) += 5 + array.at(0)
test(array, (1, 8))
@@ -38,7 +38,7 @@
---
// Test different lvalue method.
-{
+#{
let array = (1, 2, 3)
array.first() = 7
array.at(1) *= 8
@@ -47,12 +47,12 @@
---
// Test rvalue out of bounds.
-// Error: 2-17 array index out of bounds (index: 5, len: 3)
-{(1, 2, 3).at(5)}
+// Error: 3-18 array index out of bounds (index: 5, len: 3)
+#{(1, 2, 3).at(5)}
---
// Test lvalue out of bounds.
-{
+#{
let array = (1, 2, 3)
// Error: 3-14 array index out of bounds (index: 3, len: 3)
array.at(3) = 5
@@ -60,19 +60,19 @@
---
// Test bad lvalue.
-// Error: 2:3-2:14 cannot mutate a temporary value
+// Error: 2:4-2:15 cannot mutate a temporary value
#let array = (1, 2, 3)
-{ array.len() = 4 }
+#{ array.len() = 4 }
---
// Test bad lvalue.
-// Error: 2:3-2:15 type array has no method `yolo`
+// Error: 2:4-2:16 type array has no method `yolo`
#let array = (1, 2, 3)
-{ array.yolo() = 4 }
+#{ array.yolo() = 4 }
---
// Test negative indices.
-{
+#{
let array = (1, 2, 3, 4)
test(array.at(0), 1)
test(array.at(-1), 4)
@@ -89,16 +89,16 @@
#test((1, 2, 3).last(), 3)
---
-// Error: 3-13 array is empty
-{ ().first() }
+// Error: 4-14 array is empty
+#{ ().first() }
---
-// Error: 3-12 array is empty
-{ ().last() }
+// Error: 4-13 array is empty
+#{ ().last() }
---
// Test the `push` and `pop` methods.
-{
+#{
let tasks = (a: (1, 2, 3), b: (4, 5, 6))
tasks.at("a").pop()
tasks.b.push(7)
@@ -108,7 +108,7 @@
---
// Test the `insert` and `remove` methods.
-{
+#{
let array = (0, 1, 2, 4, 5)
array.insert(3, 3)
test(array, range(6))
@@ -117,9 +117,10 @@
}
---
-// Error: 2:17-2:19 missing argument: index
+// Error: 2:18-2:20 missing argument: index
#let numbers = ()
-{ numbers.insert() }
+#{ numbers.insert() }
+
---
// Test the `slice` method.
#test((1, 2, 3, 4).slice(2), (3, 4))
@@ -132,12 +133,12 @@
#test("ABCD".split("").slice(1, -1).join("-"), "A-B-C-D")
---
-// Error: 3-31 array index out of bounds (index: 12, len: 10)
-{ range(10).slice(9, count: 3) }
+// Error: 4-32 array index out of bounds (index: 12, len: 10)
+#{ range(10).slice(9, count: 3) }
---
-// Error: 3-25 array index out of bounds (index: -4, len: 3)
-{ (1, 2, 3).slice(0, -4) }
+// Error: 4-26 array index out of bounds (index: -4, len: 3)
+#{ (1, 2, 3).slice(0, -4) }
---
// Test the `position` method.
@@ -162,8 +163,8 @@
#test((1, 2, 3, 4).fold(0, (s, x) => s + x), 10)
---
-// Error: 21-31 function must have exactly two parameters
-{ (1, 2, 3).fold(0, () => none) }
+// Error: 22-32 function must have exactly two parameters
+#{ (1, 2, 3).fold(0, () => none) }
---
// Test the `rev` method.
@@ -177,17 +178,17 @@
#test("(" + ("a", "b", "c").join(", ") + ")", "(a, b, c)")
---
-// Error: 2-22 cannot join boolean with boolean
-{(true, false).join()}
+// Error: 3-23 cannot join boolean with boolean
+#{(true, false).join()}
---
-// Error: 2-20 cannot join string with integer
-{("a", "b").join(1)}
+// Error: 3-21 cannot join string with integer
+#{("a", "b").join(1)}
---
// Test joining content.
// Ref: true
-{([One], [Two], [Three]).join([, ], last: [ and ])}.
+#{([One], [Two], [Three]).join([, ], last: [ and ])}.
---
// Test the `sorted` method.
@@ -197,37 +198,37 @@
#test((2, 1, 3, 10, 5, 8, 6, -7, 2).sorted(), (-7, 1, 2, 2, 3, 5, 6, 8, 10))
---
-// Error: 2-26 cannot order content and content
-{([Hi], [There]).sorted()}
+// Error: 3-27 cannot order content and content
+#{([Hi], [There]).sorted()}
---
-// Error: 2-18 array index out of bounds (index: -4, len: 3)
-{(1, 2, 3).at(-4)}
+// Error: 3-19 array index out of bounds (index: -4, len: 3)
+#{(1, 2, 3).at(-4)}
---
-// Error: 3 expected closing paren
-{(}
+// Error: 4 expected closing paren
+#{(}
-// Error: 2-3 unexpected closing paren
-{)}
+// Error: 3-4 unexpected closing paren
+#{)}
-// Error: 4-6 unexpected end of block comment
-{(1*/2)}
+// Error: 5-7 unexpected end of block comment
+#{(1*/2)}
-// Error: 6-8 invalid number suffix
-{(1, 1u 2)}
+// Error: 7-9 invalid number suffix
+#{(1, 1u 2)}
-// Error: 3-4 unexpected comma
-{(,1)}
+// Error: 4-5 unexpected comma
+#{(,1)}
// Missing expression makes named pair incomplete, making this an empty array.
-// Error: 5 expected expression
-{(a:)}
+// Error: 6 expected expression
+#{(a:)}
// Named pair after this is already identified as an array.
-// Error: 6-10 expected expression, found named pair
-{(1, b: 2)}
+// Error: 7-11 expected expression, found named pair
+#{(1, b: 2)}
// Keyed pair after this is already identified as an array.
-// Error: 6-14 expected expression, found keyed pair
-{(1, "key": 2)}
+// Error: 7-15 expected expression, found keyed pair
+#{(1, "key": 2)}
diff --git a/tests/typ/compiler/bench.typ b/tests/typ/compiler/bench.typ
index 6aff1ac2..22795966 100644
--- a/tests/typ/compiler/bench.typ
+++ b/tests/typ/compiler/bench.typ
@@ -7,7 +7,7 @@
// ... but also "content" values. While these contain markup,
// they are also values and can be summed, stored in arrays etc.
// There are also more standard control flow structures, like #if and #for.
-#let university = [*Technische Universität {city}*]
+#let university = [*Technische Universität #{city}*]
#let faculty = [*Fakultät II, Institut for Mathematik*]
// The `box` function just places content into a rectangular container. When
diff --git a/tests/typ/compiler/block.typ b/tests/typ/compiler/block.typ
index 7fb7738b..204cab1e 100644
--- a/tests/typ/compiler/block.typ
+++ b/tests/typ/compiler/block.typ
@@ -5,14 +5,14 @@
// Ref: true
// Evaluates to join of none, [My ] and the two loop bodies.
-{
+#{
let parts = ("my fri", "end.")
[Hello, ]
- for s in parts [{s}]
+ for s in parts [#s]
}
// Evaluates to join of the content and strings.
-{
+#{
[How]
if true {
" are"
@@ -50,7 +50,7 @@
---
// Some things can't be joined.
-{
+#{
[A]
// Error: 3-4 cannot join content with integer
1
@@ -59,7 +59,7 @@
---
// Block directly in markup also creates a scope.
-{ let x = 1 }
+#{ let x = 1 }
// Error: 7-8 unknown variable
#test(x, 1)
@@ -73,22 +73,22 @@
#test(a, 1)
-// Error: 2-3 unknown variable
-{b}
+// Error: 3-4 unknown variable
+#{b}
---
// Double block creates a scope.
-{{
+#{{
import "module.typ": b
test(b, 1)
}}
-// Error: 2-3 unknown variable
-{b}
+// Error: 3-4 unknown variable
+#{b}
---
// Multiple nested scopes.
-{
+#{
let a = "a1"
{
let a = "a2"
@@ -104,28 +104,28 @@
---
// Content blocks also create a scope.
-[#let x = 1]
+#[#let x = 1]
-// Error: 2-3 unknown variable
-{x}
+// Error: 3-4 unknown variable
+#{x}
---
// Multiple unseparated expressions in one line.
-// Error: 2-4 invalid number suffix
-{1u}
+// Error: 3-5 invalid number suffix
+#{1u}
// Should output `1`.
-// Error: 3 expected semicolon or line break
-{1 2}
+// Error: 4 expected semicolon or line break
+#{1 2}
// Should output `2`.
-// Error: 12 expected semicolon or line break
-// Error: 22 expected semicolon or line break
-{let x = -1 let y = 3 x + y}
+// Error: 13 expected semicolon or line break
+// Error: 23 expected semicolon or line break
+#{let x = -1 let y = 3 x + y}
// Should output `3`.
-{
+#{
// Error: 6 expected identifier
// Error: 10 expected block
for "v"
@@ -138,9 +138,9 @@
}
---
-// Error: 2 expected closing brace
-{
+// Error: 3 expected closing brace
+#{
---
-// Error: 1-2 unexpected closing brace
-}
+// Error: 2 expected expression
+#}
diff --git a/tests/typ/compiler/break-continue.typ b/tests/typ/compiler/break-continue.typ
index fb3222fa..566234a7 100644
--- a/tests/typ/compiler/break-continue.typ
+++ b/tests/typ/compiler/break-continue.typ
@@ -96,7 +96,7 @@
#let x = { continue }
---
-// Error: 1-10 cannot continue outside of loop
+// Error: 2-10 cannot continue outside of loop
#continue
---
@@ -104,7 +104,7 @@
// Should output `Hello World 🌎`.
#for _ in range(10) {
[Hello ]
- [World {
+ [World #{
[🌎]
break
}]
diff --git a/tests/typ/compiler/call.typ b/tests/typ/compiler/call.typ
index 087e4694..690d55d3 100644
--- a/tests/typ/compiler/call.typ
+++ b/tests/typ/compiler/call.typ
@@ -6,7 +6,7 @@
// Ommitted space.
#let f() = {}
-[#f()*Bold*]
+#[#f()*Bold*]
// Call return value of function with body.
#let f(x, body) = (y) => [#x] + body + [#y]
@@ -34,7 +34,7 @@
#test(alias(alias), "function")
// Callee expressions.
-{
+#{
// Wrapped in parens.
test((type)("hi"), "string")
@@ -48,25 +48,25 @@
#set text(family: "Arial", family: "Helvetica")
---
-// Error: 2-6 expected function, found boolean
-{true()}
+// Error: 3-7 expected function, found boolean
+#{true()}
---
#let x = "x"
-// Error: 1-3 expected function, found string
+// Error: 2-3 expected function, found string
#x()
---
#let f(x) = x
-// Error: 1-6 expected function, found integer
+// Error: 2-6 expected function, found integer
#f(1)(2)
---
#let f(x) = x
-// Error: 1-6 expected function, found content
+// Error: 2-6 expected function, found content
#f[1](2)
---
@@ -90,16 +90,16 @@
// Error: 7-12 expected identifier, found string
#func("abc": 2)
-// Error: 7-10 expected identifier, found group
-{func((x):1)}
+// Error: 8-11 expected identifier, found group
+#{func((x):1)}
---
// Error: 2:1 expected closing bracket
#func[`a]`
---
-// Error: 7 expected closing paren
-{func(}
+// Error: 8 expected closing paren
+#{func(}
---
// Error: 2:1 expected quote
diff --git a/tests/typ/compiler/closure.typ b/tests/typ/compiler/closure.typ
index f1604b19..1551a66d 100644
--- a/tests/typ/compiler/closure.typ
+++ b/tests/typ/compiler/closure.typ
@@ -12,7 +12,7 @@
---
// Basic closure without captures.
-{
+#{
let adder = (x, y) => x + y
test(adder(2, 3), 5)
}
@@ -20,7 +20,7 @@
---
// Pass closure as argument and return closure.
// Also uses shorthand syntax for a single argument.
-{
+#{
let chain = (f, g) => (x) => f(g(x))
let f = x => x + 1
let g = x => 2 * x
@@ -30,7 +30,7 @@
---
// Capture environment.
-{
+#{
let mark = "!"
let greet = {
let hi = "Hi"
@@ -48,7 +48,7 @@
---
// Redefined variable.
-{
+#{
let x = 1
let f() = {
let x = x + 2
@@ -59,7 +59,7 @@
---
// Import bindings.
-{
+#{
let b = "module.typ"
let f() = {
import b: b
@@ -70,7 +70,7 @@
---
// For loop bindings.
-{
+#{
let v = (1, 2, 3)
let f() = {
let s = 0
@@ -82,7 +82,7 @@
---
// Let + closure bindings.
-{
+#{
let g = "hi"
let f() = {
let g() = "bye"
@@ -93,7 +93,7 @@
---
// Parameter bindings.
-{
+#{
let x = 5
let g() = {
let f(x, y: x) = x + y
@@ -105,7 +105,7 @@
---
// Don't leak environment.
-{
+#{
// Error: 16-17 unknown variable
let func() = x
let x = "hi"
@@ -114,7 +114,7 @@
---
// Too few arguments.
-{
+#{
let types(x, y) = "[" + type(x) + ", " + type(y) + "]"
test(types(14%, 12pt), "[ratio, length]")
@@ -124,7 +124,7 @@
---
// Too many arguments.
-{
+#{
let f(x) = x + 1
// Error: 8-13 unexpected argument
@@ -133,7 +133,7 @@
---
// Named arguments.
-{
+#{
let greet(name, birthday: false) = {
if birthday { "Happy Birthday, " } else { "Hey, " } + name + "!"
}
@@ -156,8 +156,8 @@
#let f(a, b, a: none, b: none, c, b) = none
---
-// Error: 6-16 expected identifier, named pair or argument sink, found keyed pair
-{(a, "named": b) => none}
+// Error: 7-17 expected identifier, named pair or argument sink, found keyed pair
+#{(a, "named": b) => none}
---
// Error: 10-15 expected identifier, found string
diff --git a/tests/typ/compiler/construct.typ b/tests/typ/compiler/construct.typ
index 3ed8fed3..161827cb 100644
--- a/tests/typ/compiler/construct.typ
+++ b/tests/typ/compiler/construct.typ
@@ -18,7 +18,7 @@
---
// The inner rectangle should also be yellow here.
// (and therefore invisible)
-[#set rect(fill: yellow);#text(1em, rect(inset: 5pt, rect()))]
+#[#set rect(fill: yellow);#text(1em, rect(inset: 5pt, rect()))]
---
// The inner rectangle should not be yellow here.
diff --git a/tests/typ/compiler/dict.typ b/tests/typ/compiler/dict.typ
index 5f00ef3a..c34b5478 100644
--- a/tests/typ/compiler/dict.typ
+++ b/tests/typ/compiler/dict.typ
@@ -5,7 +5,7 @@
// Ref: true
// Empty
-{(:)}
+#{(:)}
// Two pairs and string key.
#let dict = (normal: 1, "spacy key": 2)
@@ -16,7 +16,7 @@
---
// Test lvalue and rvalue access.
-{
+#{
let dict = (a: 1, "b b": 1)
dict.at("b b") += 1
dict.state = (ok: true, err: false)
@@ -29,7 +29,7 @@
---
// Test rvalue missing key.
-{
+#{
let dict = (a: 1, b: 2)
// Error: 11-23 dictionary does not contain key "c"
let x = dict.at("c")
@@ -37,7 +37,7 @@
---
// Missing lvalue is not automatically none-initialized.
-{
+#{
let dict = (:)
// Error: 3-9 dictionary does not contain key "b"
dict.b += 1
@@ -51,39 +51,39 @@
#test(dict.values(), (3, 1, 2))
#test(dict.pairs((k, v) => k + str(v)).join(), "a3b1c2")
-{ dict.remove("c") }
+#{ dict.remove("c") }
#test("c" in dict, false)
#test(dict, (a: 3, b: 1))
---
-// Error: 24-29 duplicate key
-{(first: 1, second: 2, first: 3)}
+// Error: 25-30 duplicate key
+#{(first: 1, second: 2, first: 3)}
---
-// Error: 17-20 duplicate key
-{(a: 1, "b": 2, "a": 3)}
+// Error: 18-21 duplicate key
+#{(a: 1, "b": 2, "a": 3)}
---
// Simple expression after already being identified as a dictionary.
-// Error: 9-10 expected named or keyed pair, found identifier
-{(a: 1, b)}
+// Error: 10-11 expected named or keyed pair, found identifier
+#{(a: 1, b)}
// Identified as dictionary due to initial colon.
-// Error: 4-5 expected named or keyed pair, found integer
-// Error: 5 expected comma
-// Error: 12-16 expected identifier or string, found boolean
-// Error: 17 expected expression
-{(:1 b:"", true:)}
+// Error: 5-6 expected named or keyed pair, found integer
+// Error: 6 expected comma
+// Error: 13-17 expected identifier or string, found boolean
+// Error: 18 expected expression
+#{(:1 b:"", true:)}
-// Error: 3-8 expected identifier or string, found binary expression
-{(a + b: "hey")}
+// Error: 4-9 expected identifier or string, found binary expression
+#{(a + b: "hey")}
---
-// Error: 3-15 cannot mutate a temporary value
-{ (key: "val").other = "some" }
+// Error: 4-16 cannot mutate a temporary value
+#{ (key: "val").other = "some" }
---
-{
+#{
let object = none
// Error: 3-9 expected dictionary, found none
object.property = "value"
diff --git a/tests/typ/compiler/field.typ b/tests/typ/compiler/field.typ
index 0195c6d8..c99d910d 100644
--- a/tests/typ/compiler/field.typ
+++ b/tests/typ/compiler/field.typ
@@ -5,7 +5,7 @@
// Test field on dictionary.
#let dict = (nothing: "ness", hello: "world")
#test(dict.nothing, "ness")
-{
+#{
let world = dict
.hello
@@ -23,12 +23,12 @@
- C
---
-// Error: 6-13 dictionary does not contain key "invalid"
-{(:).invalid}
+// Error: 7-14 dictionary does not contain key "invalid"
+#{(:).invalid}
---
-// Error: 2-7 expected dictionary or content, found boolean
-{false.ok}
+// Error: 9-11 cannot access fields on type boolean
+#{false.ok}
---
// Error: 29-32 unknown field `fun`
@@ -36,6 +36,6 @@
= A
---
-// Error: 8 expected identifier
-// Error: 8 expected semicolon or line break
-{false.true}
+// Error: 9 expected identifier
+// Error: 9 expected semicolon or line break
+#{false.true}
diff --git a/tests/typ/compiler/for.typ b/tests/typ/compiler/for.typ
index 7a530b73..cf717411 100644
--- a/tests/typ/compiler/for.typ
+++ b/tests/typ/compiler/for.typ
@@ -10,12 +10,12 @@
// Dictionary is not traversed in insertion order.
// Should output `Age: 2. Name: Typst.`.
#for k, v in (Name: "Typst", Age: 2) [
- {k}: {v}.
+ #k: #v.
]
// Block body.
// Should output `[1st, 2nd, 3rd, 4th]`.
-{
+#{
"["
for v in (1, 2, 3, 4) {
if v > 1 [, ]
@@ -97,8 +97,8 @@
// Error: 5 expected identifier
#for//
-// Error: 5 expected identifier
-{for}
+// Error: 6 expected identifier
+#{for}
// Error: 7 expected keyword `in`
#for v
diff --git a/tests/typ/compiler/if.typ b/tests/typ/compiler/if.typ
index 3b35ebd8..23ed9259 100644
--- a/tests/typ/compiler/if.typ
+++ b/tests/typ/compiler/if.typ
@@ -40,7 +40,7 @@
}
// Content block can be argument or body depending on whitespace.
-{
+#{
if "content" == type[b] [Fi] else [Nope]
if "content" == type [Nope] else [ve.]
}
@@ -76,7 +76,7 @@
// Value of if expressions.
// Ref: false
-{
+#{
let x = 1
let y = 2
let z
@@ -109,13 +109,13 @@
// Error: 4 expected expression
#if
-// Error: 4 expected expression
-{if}
+// Error: 5 expected expression
+#{if}
// Error: 6 expected block
#if x
-// Error: 1-6 unexpected keyword `else`
+// Error: 2 expected expression
#else {}
// Should output `x`.
diff --git a/tests/typ/compiler/import.typ b/tests/typ/compiler/import.typ
index a657be50..f97b1ae0 100644
--- a/tests/typ/compiler/import.typ
+++ b/tests/typ/compiler/import.typ
@@ -49,8 +49,8 @@
#test((module,).at(0).item(1, 2), 3)
// Doesn't work because of mutating name.
-// Error: 2-11 cannot mutate a temporary value
-{(module,).at(0).push()}
+// Error: 3-12 cannot mutate a temporary value
+#{(module,).at(0).push()}
---
// Who needs whitespace anyways?
diff --git a/tests/typ/compiler/include.typ b/tests/typ/compiler/include.typ
index 289fea21..a655e9f2 100644
--- a/tests/typ/compiler/include.typ
+++ b/tests/typ/compiler/include.typ
@@ -15,7 +15,7 @@
#chap2
---
-{
+#{
// Error: 19-38 file not found (searched at typ/compiler/modules/chap3.typ)
let x = include "modules/chap3.typ"
}
@@ -24,7 +24,7 @@
#include "modules/chap1.typ"
// The variables of the file should not appear in this scope.
-// Error: 1-6 unknown variable
+// Error: 2-6 unknown variable
#name
---
diff --git a/tests/typ/compiler/label.typ b/tests/typ/compiler/label.typ
index 795c0435..d4ff15d7 100644
--- a/tests/typ/compiler/label.typ
+++ b/tests/typ/compiler/label.typ
@@ -26,7 +26,7 @@ The end.
it
}
-This is a thing [that <last>] happened.
+This is a thing #[that <last>] happened.
---
// Test abusing dynamic labels for styling.
@@ -50,7 +50,7 @@ _Visible_
---
// Test that label only works within one content block.
#show <strike>: strike
-*This is* [<strike>] *protected.*
+*This is* #[<strike>] *protected.*
*This is not.* <strike>
---
diff --git a/tests/typ/compiler/let.typ b/tests/typ/compiler/let.typ
index 3a879ce7..aa1132b9 100644
--- a/tests/typ/compiler/let.typ
+++ b/tests/typ/compiler/let.typ
@@ -36,8 +36,8 @@ Three
// Error: 5 expected identifier
#let
-// Error: 5 expected identifier
-{let}
+// Error: 6 expected identifier
+#{let}
// Error: 5 expected identifier
// Error: 5 expected semicolon or line break
diff --git a/tests/typ/compiler/methods.typ b/tests/typ/compiler/methods.typ
index f468320b..ae0945df 100644
--- a/tests/typ/compiler/methods.typ
+++ b/tests/typ/compiler/methods.typ
@@ -7,7 +7,7 @@
---
// Test mutating indexed value.
-{
+#{
let matrix = (((1,), (2,)), ((3,), (4,)))
matrix.at(1).at(0).push(5)
test(matrix, (((1,), (2,)), ((3, 5), (4,))))
@@ -15,7 +15,7 @@
---
// Test multiline chain in code block.
-{
+#{
let rewritten = "Hello. This is a sentence. And one more."
.split(".")
.map(s => s.trim())
@@ -27,20 +27,20 @@
}
---
-// Error: 2:3-2:16 type array has no method `fun`
+// Error: 2:4-2:17 type array has no method `fun`
#let numbers = ()
-{ numbers.fun() }
+#{ numbers.fun() }
---
-// Error: 2:3-2:44 cannot mutate a temporary value
+// Error: 2:4-2:45 cannot mutate a temporary value
#let numbers = (1, 2, 3)
-{ numbers.map(v => v / 2).sorted().map(str).remove(4) }
+#{ numbers.map(v => v / 2).sorted().map(str).remove(4) }
---
-// Error: 2:3-2:19 cannot mutate a temporary value
+// Error: 2:4-2:20 cannot mutate a temporary value
#let numbers = (1, 2, 3)
-{ numbers.sorted() = 1 }
+#{ numbers.sorted() = 1 }
---
-// Error: 3-6 cannot mutate a constant
-{ box.push(1) }
+// Error: 4-7 cannot mutate a constant
+#{ box.push(1) }
diff --git a/tests/typ/compiler/ops-invalid.typ b/tests/typ/compiler/ops-invalid.typ
index d51e42fb..3356a24c 100644
--- a/tests/typ/compiler/ops-invalid.typ
+++ b/tests/typ/compiler/ops-invalid.typ
@@ -2,8 +2,8 @@
// Ref: false
---
-// Error: 3 expected expression
-{-}
+// Error: 4 expected expression
+#{-}
---
// Error: 10 expected expression
@@ -14,115 +14,115 @@
#test({2*}, 2)
---
-// Error: 2-12 cannot apply '+' to content
-{+([] + [])}
+// Error: 3-13 cannot apply '+' to content
+#{+([] + [])}
---
-// Error: 2-5 cannot apply '-' to string
-{-""}
+// Error: 3-6 cannot apply '-' to string
+#{-""}
---
-// Error: 2-8 cannot apply 'not' to array
-{not ()}
+// Error: 3-9 cannot apply 'not' to array
+#{not ()}
---
-// Error: 2-18 cannot apply '<=' to relative length and ratio
-{30% + 1pt <= 40%}
+// Error: 3-19 cannot apply '<=' to relative length and ratio
+#{30% + 1pt <= 40%}
---
-// Error: 2-13 cannot apply '<=' to length and length
-{1em <= 10pt}
+// Error: 3-14 cannot apply '<=' to length and length
+#{1em <= 10pt}
---
-// Error: 2-11 cannot divide by zero
-{1.2 / 0.0}
+// Error: 3-12 cannot divide by zero
+#{1.2 / 0.0}
---
-// Error: 2-7 cannot divide by zero
-{1 / 0}
+// Error: 3-8 cannot divide by zero
+#{1 / 0}
---
-// Error: 2-14 cannot divide by zero
-{15deg / 0deg}
+// Error: 3-15 cannot divide by zero
+#{15deg / 0deg}
---
// Special messages for +, -, * and /.
-// Error: 03-10 cannot add integer and string
-{(1 + "2", 40% - 1)}
+// Error: 4-11 cannot add integer and string
+#{(1 + "2", 40% - 1)}
---
-// Error: 14-22 cannot add integer and string
-{ let x = 1; x += "2" }
+// Error: 15-23 cannot add integer and string
+#{ let x = 1; x += "2" }
---
-// Error: 3-12 cannot divide ratio by length
-{ 10% / 5pt }
+// Error: 4-13 cannot divide ratio by length
+#{ 10% / 5pt }
---
-// Error: 3-12 cannot divide these two lengths
-{ 1em / 5pt }
+// Error: 4-13 cannot divide these two lengths
+#{ 1em / 5pt }
---
-// Error: 3-19 cannot divide relative length by ratio
-{ (10% + 1pt) / 5% }
+// Error: 4-20 cannot divide relative length by ratio
+#{ (10% + 1pt) / 5% }
---
-// Error: 3-28 cannot divide these two relative lengths
-{ (10% + 1pt) / (20% + 1pt) }
+// Error: 4-29 cannot divide these two relative lengths
+#{ (10% + 1pt) / (20% + 1pt) }
---
-// Error: 12-19 cannot subtract integer from ratio
-{(1234567, 40% - 1)}
+// Error: 13-20 cannot subtract integer from ratio
+#{(1234567, 40% - 1)}
---
-// Error: 2-10 cannot multiply integer with boolean
-{2 * true}
+// Error: 3-11 cannot multiply integer with boolean
+#{2 * true}
---
-// Error: 2-10 cannot divide integer by length
-{3 / 12pt}
+// Error: 3-11 cannot divide integer by length
+#{3 / 12pt}
---
-// Error: 2-9 cannot repeat this string -1 times
-{-1 * ""}
+// Error: 3-10 cannot repeat this string -1 times
+#{-1 * ""}
---
-{
+#{
let x = 2
for _ in range(61) {
(x) *= 2
}
- // Error: 4-18 cannot repeat this string 4611686018427387904 times
- {x * "abcdefgh"}
+ // Error: 3-17 cannot repeat this string 4611686018427387904 times
+ x * "abcdefgh"
}
---
-// Error: 4-5 unknown variable
-{ (x) = "" }
+// Error: 5-6 unknown variable
+#{ (x) = "" }
---
-// Error: 3-8 cannot mutate a temporary value
-{ 1 + 2 += 3 }
+// Error: 4-9 cannot mutate a temporary value
+#{ 1 + 2 += 3 }
---
-// Error: 2:2-2:7 cannot apply 'not' to string
+// Error: 2:3-2:8 cannot apply 'not' to string
#let x = "Hey"
-{not x = "a"}
+#{not x = "a"}
---
-// Error: 7-8 unknown variable
-{ 1 + x += 3 }
+// Error: 8-9 unknown variable
+#{ 1 + x += 3 }
---
-// Error: 3-4 unknown variable
-{ z = 1 }
+// Error: 4-5 unknown variable
+#{ z = 1 }
---
-// Error: 3-7 cannot mutate a constant
-{ rect = "hi" }
+// Error: 4-8 cannot mutate a constant
+#{ rect = "hi" }
---
// Works if we define rect beforehand
// (since then it doesn't resolve to the standard library version anymore).
#let rect = ""
-{ rect = "hi" }
+#{ rect = "hi" }
diff --git a/tests/typ/compiler/ops-prec.typ b/tests/typ/compiler/ops-prec.typ
index eba0c8a9..2fa90382 100644
--- a/tests/typ/compiler/ops-prec.typ
+++ b/tests/typ/compiler/ops-prec.typ
@@ -14,9 +14,14 @@
---
// Assignment binds stronger than boolean operations.
-// Error: 2:2-2:7 cannot mutate a temporary value
+// Error: 2:3-2:8 cannot mutate a temporary value
#let x = false
-{not x = "a"}
+#{not x = "a"}
+
+---
+// Precedence doesn't matter for chained unary operators.
+// Error: 3-12 cannot apply '-' to boolean
+#{-not true}
---
// Parentheses override precedence.
@@ -25,8 +30,3 @@
// Error: 14 expected closing paren
#test({(1 + 1}, 2)
-
----
-// Precedence doesn't matter for chained unary operators.
-// Error: 2-11 cannot apply '-' to boolean
-{-not true}
diff --git a/tests/typ/compiler/ops.typ b/tests/typ/compiler/ops.typ
index 722a9c8d..3e72476c 100644
--- a/tests/typ/compiler/ops.typ
+++ b/tests/typ/compiler/ops.typ
@@ -4,7 +4,7 @@
---
// Test adding content.
// Ref: true
-{[*Hello* ] + [world!]}
+#{[*Hello* ] + [world!]}
---
// Test math operators.
@@ -176,17 +176,17 @@
// Test assignment operators.
#let x = 0
-{ x = 10 } #test(x, 10)
-{ x -= 5 } #test(x, 5)
-{ x += 1 } #test(x, 6)
-{ x *= x } #test(x, 36)
-{ x /= 2.0 } #test(x, 18.0)
-{ x = "some" } #test(x, "some")
-{ x += "thing" } #test(x, "something")
+#{ x = 10 } #test(x, 10)
+#{ x -= 5 } #test(x, 5)
+#{ x += 1 } #test(x, 6)
+#{ x *= x } #test(x, 36)
+#{ x /= 2.0 } #test(x, 18.0)
+#{ x = "some" } #test(x, "some")
+#{ x += "thing" } #test(x, "something")
---
-// Error: 3-6 cannot mutate a constant
-{ box = 1 }
+// Error: 4-7 cannot mutate a constant
+#{ box = 1 }
---
// Test `in` operator.
@@ -204,8 +204,8 @@
/* fun comment? */ in "abc", false)
---
-// Error: 9 expected keyword `in`
-{"a" not}
+// Error: 10 expected keyword `in`
+#{"a" not}
---
// Test `with` method.
diff --git a/tests/typ/compiler/repr.typ b/tests/typ/compiler/repr.typ
index bdea9c82..a22fdd49 100644
--- a/tests/typ/compiler/repr.typ
+++ b/tests/typ/compiler/repr.typ
@@ -2,33 +2,33 @@
---
// Literal values.
-{auto} \
-{none} (empty) \
-{true} \
-{false}
+#auto \
+#none (empty) \
+#true \
+#false
---
// Numerical values.
-{1} \
-{1.0e-4} \
-{3.15} \
-{1e-10} \
-{50.368%} \
-{0.0000012345pt} \
-{4.5cm} \
-{12e1pt} \
-{2.5rad} \
-{45deg} \
-{1.7em} \
-{1cm + 0em} \
-{2em + 10pt} \
-{2.3fr}
+#1 \
+#1.0e-4 \
+#3.15 \
+#1e-10 \
+#50.368% \
+#0.0000012345pt \
+#4.5cm \
+#12e1pt \
+#2.5rad \
+#45deg \
+#1.7em \
+#{1cm + 0em} \
+#{2em + 10pt} \
+#2.3fr
---
// Colors and strokes.
#set text(0.8em)
#rgb("f7a205") \
-{2pt + rgb("f7a205")}
+#{2pt + rgb("f7a205")}
---
// Strings and escaping.
@@ -43,6 +43,6 @@
// Functions are invisible.
Nothing
#let f(x) = x
-{f}
-{rect}
-{() => none}
+#f
+#rect
+#{() => none}
diff --git a/tests/typ/compiler/set.typ b/tests/typ/compiler/set.typ
index 034bfab8..39c3e613 100644
--- a/tests/typ/compiler/set.typ
+++ b/tests/typ/compiler/set.typ
@@ -3,18 +3,18 @@
---
// Test that text is affected by instantiation-site bold.
#let x = [World]
-Hello *{x}*
+Hello *#x*
---
// Test that lists are affected by correct indents.
#let fruit = [
- Apple
- Orange
- #list(body-indent: 20pt, [Pear])
+ #list(body-indent: 20pt)[Pear]
]
- Fruit
-[#set list(indent: 10pt)
+#[#set list(indent: 10pt)
#fruit]
- No more fruit
@@ -28,7 +28,7 @@ Hello *{x}*
---
// Test that scoping works as expected.
-{
+#{
if true {
set text(blue)
[Blue ]
@@ -62,5 +62,5 @@ Hello *{x}*
#set text(red) if 1 + 2
---
-// Error: 11-25 set is only allowed directly in code and content blocks
-{ let x = set text(blue) }
+// Error: 12-26 set is only allowed directly in code and content blocks
+#{ let x = set text(blue) }
diff --git a/tests/typ/compiler/shorthand.typ b/tests/typ/compiler/shorthand.typ
index 5c94dab0..02c42ab0 100644
--- a/tests/typ/compiler/shorthand.typ
+++ b/tests/typ/compiler/shorthand.typ
@@ -17,4 +17,4 @@ a~b
---
#set text("Roboto")
-A... vs {"A..."}
+A... vs #"A..."
diff --git a/tests/typ/compiler/show-bare.typ b/tests/typ/compiler/show-bare.typ
index 8b8d0852..2f076ade 100644
--- a/tests/typ/compiler/show-bare.typ
+++ b/tests/typ/compiler/show-bare.typ
@@ -16,7 +16,7 @@ in booklovers and the great fulfiller of human need.
---
// Test bare show in content block.
-A [_B #show c => [*#c*]; C_] D
+A #[_B #show c => [*#c*]; C_] D
---
// Test style precedence.
@@ -29,5 +29,5 @@ Forest
Ignored
---
-// Error: 4-18 show is only allowed directly in code and content blocks
-{ (show body => 2) * body }
+// Error: 5-19 show is only allowed directly in code and content blocks
+#{ (show body => 2) * body }
diff --git a/tests/typ/compiler/show-node.typ b/tests/typ/compiler/show-node.typ
index 46663c68..4aba4e9b 100644
--- a/tests/typ/compiler/show-node.typ
+++ b/tests/typ/compiler/show-node.typ
@@ -14,7 +14,7 @@
// Test full reset.
#show heading: [B]
#show heading: set text(size: 10pt, weight: 400)
-A [= Heading] C
+A #[= Heading] C
---
// Test full removal.
@@ -58,7 +58,7 @@ Another text.
---
// Test that scoping works as expected.
-{
+#{
let world = [ World ]
show "W": strong
world
@@ -100,5 +100,5 @@ Another text.
#show red: []
---
-// Error: 7-25 show is only allowed directly in code and content blocks
-{ 1 + show heading: none }
+// Error: 8-26 show is only allowed directly in code and content blocks
+#{ 1 + show heading: none }
diff --git a/tests/typ/compiler/spread.typ b/tests/typ/compiler/spread.typ
index 244e9fb9..ce3d8cea 100644
--- a/tests/typ/compiler/spread.typ
+++ b/tests/typ/compiler/spread.typ
@@ -3,7 +3,7 @@
---
// Test standard argument overriding.
-{
+#{
let f(style: "normal", weight: "regular") = {
"(style: " + style + ", weight: " + weight + ")"
}
@@ -16,7 +16,7 @@
---
// Test multiple calls.
-{
+#{
let f(b, c: "!") = b + c
let g(a, ..sink) = a + f(..sink)
test(g("a", "b", c: "c"), "abc")
@@ -24,7 +24,7 @@
---
// Test doing things with arguments.
-{
+#{
let save(..args) = {
test(type(args), "arguments")
test(repr(args), "(1, 2, three: true)")
@@ -35,14 +35,14 @@
---
// Test spreading array and dictionary.
-{
+#{
let more = (3, -3, 6, 10)
test(min(1, 2, ..more), -3)
test(max(..more, 9), 10)
test(max(..more, 11), 11)
}
-{
+#{
let more = (c: 3, d: 4)
let tostr(..args) = repr(args)
test(tostr(a: 1, ..more, b: 2), "(a: 1, c: 3, d: 4, b: 2)")
@@ -69,14 +69,14 @@
---
// Test spreading into array and dictionary.
-{
+#{
let l = (1, 2, 3)
let r = (5, 6, 7)
test((..l, 4, ..r), range(1, 8))
test((..none), ())
}
-{
+#{
let x = (a: 1)
let y = (b: 2)
let z = (a: 3)
@@ -85,9 +85,9 @@
}
---
-// Error: 11-17 cannot spread dictionary into array
-{(1, 2, ..(a: 1))}
+// Error: 12-18 cannot spread dictionary into array
+#{(1, 2, ..(a: 1))}
---
-// Error: 5-11 cannot spread array into dictionary
-{(..(1, 2), a: 1)}
+// Error: 6-12 cannot spread array into dictionary
+#{(..(1, 2), a: 1)}
diff --git a/tests/typ/compiler/string.typ b/tests/typ/compiler/string.typ
index 8ac515a5..57699074 100644
--- a/tests/typ/compiler/string.typ
+++ b/tests/typ/compiler/string.typ
@@ -13,12 +13,12 @@
#test("🏳️‍🌈A🏳️‍⚧️".last(), "🏳️‍⚧️")
---
-// Error: 3-13 string is empty
-{ "".first() }
+// Error: 4-14 string is empty
+#{ "".first() }
---
-// Error: 3-12 string is empty
-{ "".last() }
+// Error: 4-13 string is empty
+#{ "".last() }
---
// Test the `at` method.
@@ -27,8 +27,8 @@
#test("Hey: 🏳️‍🌈 there!".at(5), "🏳️‍🌈")
---
-// Error: 3-16 string index out of bounds (index: 5, len: 5)
-{ "Hello".at(5) }
+// Error: 4-17 string index out of bounds (index: 5, len: 5)
+#{ "Hello".at(5) }
---
// Test the `slice` method.
@@ -135,8 +135,8 @@
#test("hello world".trim(regex(".")), "")
---
-// Error: 17-21 expected either `start` or `end`
-{"abc".trim(at: left)}
+// Error: 18-22 expected either `start` or `end`
+#{"abc".trim(at: left)}
---
// Test the `split` method.
diff --git a/tests/typ/compiler/while.typ b/tests/typ/compiler/while.typ
index d495a84a..8070d2e0 100644
--- a/tests/typ/compiler/while.typ
+++ b/tests/typ/compiler/while.typ
@@ -4,7 +4,7 @@
// Should output `2 4 6 8 10`.
#let i = 0
#while i < 10 [
- { i += 2 }
+ #{ i += 2 }
#i
]
@@ -26,7 +26,7 @@
#test(while false {}, none)
#let i = 0
-#test(type(while i < 1 [{ i += 1 }]), "content")
+#test(type(while i < 1 [#{ i += 1 }]), "content")
---
// Condition must be boolean.
@@ -38,7 +38,7 @@
#while 2 < "hello".len() {}
---
-// Error: 2:1-2:24 loop seems to be infinite
+// Error: 2:2-2:24 loop seems to be infinite
#let i = 1
#while i > 0 { i += 1 }
@@ -46,8 +46,8 @@
// Error: 7 expected expression
#while
-// Error: 7 expected expression
-{while}
+// Error: 8 expected expression
+#{while}
// Error: 9 expected block
#while x
diff --git a/tests/typ/compute/foundations.typ b/tests/typ/compute/foundations.typ
index 6fc93a75..1b2ab473 100644
--- a/tests/typ/compute/foundations.typ
+++ b/tests/typ/compute/foundations.typ
@@ -43,8 +43,8 @@ Blue #move(dy: -0.15em)[🌊]
```
---
-// Error: 7-19 cannot continue outside of loop
-#eval("{continue}")
+// Error: 7-18 cannot continue outside of loop
+#eval("#continue")
---
// Error: 7-33 cannot access file system from here
@@ -72,5 +72,5 @@ _No relative giraffe!_
```
---
-// Error: 7-16 expected comma
-#eval("{(1 2)}")
+// Error: 7-15 expected comma
+#eval("#(1 2)")
diff --git a/tests/typ/compute/utility.typ b/tests/typ/compute/utility.typ
index c99c0858..73bb2e2d 100644
--- a/tests/typ/compute/utility.typ
+++ b/tests/typ/compute/utility.typ
@@ -8,7 +8,7 @@
// Test custom paragraphs with user code.
#set text(8pt)
-{
+#{
let sentences = lorem(59)
.split(".")
.filter(s => s != "")
diff --git a/tests/typ/layout/page-margin.typ b/tests/typ/layout/page-margin.typ
index 9be2484f..53bc27ce 100644
--- a/tests/typ/layout/page-margin.typ
+++ b/tests/typ/layout/page-margin.typ
@@ -2,7 +2,7 @@
---
// Set all margins at once.
-[
+#[
#set page(height: 20pt, margin: 5pt)
#place(top + left)[TL]
#place(bottom + right)[BR]
@@ -11,10 +11,10 @@
---
// Set individual margins.
#set page(height: 40pt)
-[#set page(margin: (left: 0pt)); #align(left)[Left]]
-[#set page(margin: (right: 0pt)); #align(right)[Right]]
-[#set page(margin: (top: 0pt)); #align(top)[Top]]
-[#set page(margin: (bottom: 0pt)); #align(bottom)[Bottom]]
+#[#set page(margin: (left: 0pt)); #align(left)[Left]]
+#[#set page(margin: (right: 0pt)); #align(right)[Right]]
+#[#set page(margin: (top: 0pt)); #align(top)[Top]]
+#[#set page(margin: (bottom: 0pt)); #align(bottom)[Bottom]]
// Ensure that specific margins override general margins.
-[#set page(margin: (rest: 0pt, left: 20pt)); Overriden]
+#[#set page(margin: (rest: 0pt, left: 20pt)); Overriden]
diff --git a/tests/typ/layout/page.typ b/tests/typ/layout/page.typ
index 50b6a394..2815e230 100644
--- a/tests/typ/layout/page.typ
+++ b/tests/typ/layout/page.typ
@@ -14,11 +14,11 @@
// Set width and height.
// Should result in one high and one wide page.
#set page(width: 80pt, height: 80pt)
-[#set page(width: 40pt);High]
-[#set page(height: 40pt);Wide]
+#[#set page(width: 40pt);High]
+#[#set page(height: 40pt);Wide]
// Flipped predefined paper.
-[#set page(paper: "a11", flipped: true);Flipped A11]
+#[#set page(paper: "a11", flipped: true);Flipped A11]
---
// Test page fill.
diff --git a/tests/typ/layout/pagebreak.typ b/tests/typ/layout/pagebreak.typ
index 349a2fc2..f5921191 100644
--- a/tests/typ/layout/pagebreak.typ
+++ b/tests/typ/layout/pagebreak.typ
@@ -26,12 +26,12 @@ Second
// Test a combination of pagebreaks, styled pages and pages with bodies.
// Should result in three five pages, with the fourth one being forest-colored.
#set page(width: 80pt, height: 30pt)
-[#set page(width: 60pt); First]
+#[#set page(width: 60pt); First]
#pagebreak()
#pagebreak()
Third
#page(height: 20pt, fill: forest)[]
-Fif[#set page();th]
+Fif#[#set page();th]
---
// Test hard and weak pagebreak followed by page with body.
diff --git a/tests/typ/layout/par-bidi.typ b/tests/typ/layout/par-bidi.typ
index 11c0cafa..4baefcd3 100644
--- a/tests/typ/layout/par-bidi.typ
+++ b/tests/typ/layout/par-bidi.typ
@@ -47,7 +47,7 @@ Lריווח #h(1cm) R
---
// Test whether L1 whitespace resetting destroys stuff.
-الغالب #h(70pt) ن{" "}ة
+الغالب #h(70pt) ن#" "ة
---
// Test setting a vertical direction.
diff --git a/tests/typ/layout/par-justify.typ b/tests/typ/layout/par-justify.typ
index e3d61322..5a9012d1 100644
--- a/tests/typ/layout/par-justify.typ
+++ b/tests/typ/layout/par-justify.typ
@@ -30,4 +30,4 @@ D E F #linebreak(justify: true)
// Test that there are no hick-ups with justification enabled and
// basically empty paragraph.
#set par(justify: true)
-{""}
+#""
diff --git a/tests/typ/layout/repeat.typ b/tests/typ/layout/repeat.typ
index 82d64b94..05b055af 100644
--- a/tests/typ/layout/repeat.typ
+++ b/tests/typ/layout/repeat.typ
@@ -12,7 +12,7 @@
)
#for section in sections [
- {section.at(0)} #repeat[.] {section.at(1)} \
+ #section.at(0) #repeat[.] #section.at(1) \
]
---
diff --git a/tests/typ/layout/transform.typ b/tests/typ/layout/transform.typ
index 2dde626b..58a053e9 100644
--- a/tests/typ/layout/transform.typ
+++ b/tests/typ/layout/transform.typ
@@ -3,13 +3,13 @@
---
// Test creating the TeX and XeTeX logos.
#let size = 11pt
-#let tex = [{
+#let tex = {
[T]
h(-0.14 * size)
move(dy: 0.22 * size)[E]
h(-0.12 * size)
[X]
-}]
+}
#let xetex = {
[X]
diff --git a/tests/typ/math/style.typ b/tests/typ/math/style.typ
index a8b9c7a5..5089610b 100644
--- a/tests/typ/math/style.typ
+++ b/tests/typ/math/style.typ
@@ -3,10 +3,10 @@
#let modifiers = (v => v, math.italic, math.bold, v => math.italic(math.bold(v)))
#let cells = ([:triangle:nested:], [--], [`italic`], [`bold`], [both])
-#for k in kinds {
- cells.push(raw(repr(k).trim("<function ").trim(">")))
- for m in modifiers {
- cells.push($ #m(#k(part)) $)
+#for kk in kinds {
+ cells.push(raw(repr(kk).trim("<function ").trim(">")))
+ for mm in modifiers {
+ cells.push($ mm(kk(part)) $)
}
}
diff --git a/tests/typ/meta/document.typ b/tests/typ/meta/document.typ
index 1fcb8109..bbe8dafa 100644
--- a/tests/typ/meta/document.typ
+++ b/tests/typ/meta/document.typ
@@ -8,23 +8,23 @@
---
Hello
-// Error: 1-30 must appear before any content
+// Error: 2-30 must appear before any content
#set document(title: "Hello")
---
#box[
- // Error: 3-32 not allowed here
+ // Error: 4-32 not allowed here
#set document(title: "Hello")
]
---
#box[
- // Error: 3-18 not allowed here
+ // Error: 4-18 not allowed here
#set page("a4")
]
---
#box[
- // Error: 3-15 not allowed here
+ // Error: 4-15 not allowed here
#pagebreak()
]
diff --git a/tests/typ/meta/outline.typ b/tests/typ/meta/outline.typ
index 96629f8c..1f882cec 100644
--- a/tests/typ/meta/outline.typ
+++ b/tests/typ/meta/outline.typ
@@ -11,7 +11,7 @@
= Analyse
#lorem(10)
-[
+#[
#set heading(outlined: false)
== Methodik
#lorem(6)
diff --git a/tests/typ/text/em.typ b/tests/typ/text/em.typ
index dd0a436e..f901aae4 100644
--- a/tests/typ/text/em.typ
+++ b/tests/typ/text/em.typ
@@ -3,10 +3,10 @@
---
#set text(size: 5pt)
A // 5pt
-[
+#[
#set text(size: 2em)
B // 10pt
- [
+ #[
#set text(size: 1.5em + 1pt)
C // 16pt
#text(size: 2em)[D] // 32pt
diff --git a/tests/typ/text/emphasis.typ b/tests/typ/text/emphasis.typ
index f4570031..0191ac87 100644
--- a/tests/typ/text/emphasis.typ
+++ b/tests/typ/text/emphasis.typ
@@ -8,7 +8,7 @@ _Emphasized and *strong* words!_
hello_world Nutzer*innen
// Can contain paragraph in nested content block.
-_Still [
+_Still #[
] emphasized._
@@ -24,7 +24,7 @@ Normal
*Bold*
#set strong(delta: 150)
-*Medium* and *[*Bold*]*
+*Medium* and *#[*Bold*]*
---
// Error: 13 expected underscore
@@ -38,6 +38,6 @@ _Hello
World
---
-// Error: 25 expected star
-// Error: 25 expected underscore
-[_Cannot *be interleaved]
+// Error: 26 expected star
+// Error: 26 expected underscore
+#[_Cannot *be interleaved]
diff --git a/tests/typ/text/font.typ b/tests/typ/text/font.typ
index 0889a0f3..d2add0f1 100644
--- a/tests/typ/text/font.typ
+++ b/tests/typ/text/font.typ
@@ -25,7 +25,7 @@
Emoji: 🐪, 🌋, 🏞
// Colors.
-[
+#[
#set text(fill: eastern)
This is #text(rgb("FA644B"))[way more] colorful.
]
diff --git a/tests/typ/text/quotes.typ b/tests/typ/text/quotes.typ
index 0c64867a..c63caa74 100644
--- a/tests/typ/text/quotes.typ
+++ b/tests/typ/text/quotes.typ
@@ -50,4 +50,4 @@ He's told some books contain questionable "example text".
// Test changing properties within text.
"She suddenly started speaking french: #text(lang: "fr")['Je suis une banane.']" Roman told me.
-Some people's thought on this would be [#set smartquote(enabled: false); "strange."]
+Some people's thought on this would be #[#set smartquote(enabled: false); "strange."]
diff --git a/tests/typ/text/space.typ b/tests/typ/text/space.typ
index 8dcc59e3..51970a48 100644
--- a/tests/typ/text/space.typ
+++ b/tests/typ/text/space.typ
@@ -7,7 +7,7 @@ C #let x = 2;D #test(x, 2) \
E#if true [F]G \
H #if true{"I"} J \
K #if true [L] else []M \
-#let c = true; N#while c [{c = false}O] P \
+#let c = true; N#while c [#{c = false}O] P \
#let c = true; Q #while c { c = false; "R" } S \
T#for _ in (none,) {"U"}V
@@ -19,11 +19,11 @@ A /**/B/**/ C
---
// Test that a run consisting only of whitespace isn't trimmed.
-A[#set text("IBM Plex Serif"); ]B
+A#text("IBM Plex Serif")[ ]B
---
// Test font change after space.
-Left [#set text("IBM Plex Serif");Right].
+Left #text("IBM Plex Serif")[Right].
---
// Test that linebreak consumed surrounding spaces.
@@ -31,7 +31,7 @@ Left [#set text("IBM Plex Serif");Right].
---
// Test that space at start of non-backslash-linebreak line isn't trimmed.
-A{"\n"} B
+A#"\n" B
---
// Test that trailing space does not force a line break.
diff --git a/tests/typ/visualize/line.typ b/tests/typ/visualize/line.typ
index 9cc9b8cc..2085daa1 100644
--- a/tests/typ/visualize/line.typ
+++ b/tests/typ/visualize/line.typ
@@ -6,10 +6,10 @@
---
// Test the `end` argument.
-{
- line(end: (10pt, 0pt))
- line(start: (0pt, 10pt), end: (0pt, 0pt))
- line(end: (15pt, 15pt))
+#{
+ line(end: (10pt, 0pt))
+ line(start: (0pt, 10pt), end: (0pt, 0pt))
+ line(end: (15pt, 15pt))
}
#v(.5cm)
diff --git a/tests/typ/visualize/shape-fill-stroke.typ b/tests/typ/visualize/shape-fill-stroke.typ
index d14d0981..8820a9fd 100644
--- a/tests/typ/visualize/shape-fill-stroke.typ
+++ b/tests/typ/visualize/shape-fill-stroke.typ
@@ -16,7 +16,7 @@
variant(fill: forest, stroke: black + 2pt),
variant(fill: forest, stroke: conifer + 2pt),
) {
- (align(horizon)[{i + 1}.], item, [])
+ (align(horizon)[#{i + 1}.], item, [])
}
#grid(
diff --git a/tests/typ/visualize/shape-rect.typ b/tests/typ/visualize/shape-rect.typ
index c8518bbd..ff80dfb9 100644
--- a/tests/typ/visualize/shape-rect.typ
+++ b/tests/typ/visualize/shape-rect.typ
@@ -24,9 +24,9 @@
#rect(height: 1cm, width: 100%, fill: rgb("734ced"))[Topleft]
// These are inline with text.
-\{#rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67"))
- #rect(width: 0.5in, height: 7pt, fill: rgb("edd466"))
- #rect(width: 0.5in, height: 7pt, fill: rgb("e3be62"))\}
+{#rect(width: 0.5in, height: 7pt, fill: rgb("d6cd67"))
+ #rect(width: 0.5in, height: 7pt, fill: rgb("edd466"))
+ #rect(width: 0.5in, height: 7pt, fill: rgb("e3be62"))}
// Rounded corners.
#rect(width: 2cm, radius: 60%)
@@ -39,10 +39,8 @@
))
// Different strokes.
-[
- #set rect(stroke: (right: red))
- #rect(width: 100%, fill: lime, stroke: (x: 5pt, y: 1pt))
-]
+#set rect(stroke: (right: red))
+#rect(width: 100%, fill: lime, stroke: (x: 5pt, y: 1pt))
---
// Error: 15-38 unexpected key "cake", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest"