summaryrefslogtreecommitdiff
path: root/tests/typ/code
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-17 22:04:18 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-17 22:20:37 +0200
commit594809e35b9e768f1a50926cf5e7a9df41ba7d16 (patch)
tree488f201599a67329d7916b9b3ecb73dd27ad24d7 /tests/typ/code
parentc53d98a22f367a9eecfb45d1b22f1be5c6cf908d (diff)
Library functions behave more imperatively
- Templates scope state changes - State-modifying function operate in place instead of returning a template - Internal template representation contains actual owned nodes instead of a pointer to a syntax tree + an expression map - No more wide calls
Diffstat (limited to 'tests/typ/code')
-rw-r--r--tests/typ/code/call.typ34
-rw-r--r--tests/typ/code/ops.typ2
2 files changed, 2 insertions, 34 deletions
diff --git a/tests/typ/code/call.typ b/tests/typ/code/call.typ
index 92ac17ae..ffd91769 100644
--- a/tests/typ/code/call.typ
+++ b/tests/typ/code/call.typ
@@ -5,7 +5,7 @@
// Ref: true
// Ommitted space.
-#font(weight:bold)[Bold]
+[#font(weight:bold)Bold]
// Call return value of function with body.
#let f(x, body) = (y) => [#x] + body + [#y]
@@ -21,35 +21,6 @@
#f([A])
---
-// Ref: true
-
-// Test multiple wide calls in separate expressions inside a template.
-[
- #font!(fill: eastern) - First
- #font!(fill: forest) - Second
-]
-
-// Test wide call in heading.
-= A #align!(right) B
-C
-
----
-// Test wide call in expression.
-
-// Error: 2-4 wide calls are only allowed directly in templates
-{f!()}
-
-// Error: 5-7 wide calls are only allowed directly in templates
-#g!(f!())
-
----
-// Test wide call evaluation semantics.
-#let x = 1
-#let f(x, body) = test(x, 1)
-#f!(x)
-{ x = 2 }
-
----
// Trailing comma.
#test(1 + 1, 2,)
@@ -90,9 +61,6 @@ C
#f[1](2)
---
-// Error: 7 expected argument list
-#func!
-
// Error: 7-8 expected expression, found colon
#func(:)
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ
index d77c7503..201f86da 100644
--- a/tests/typ/code/ops.typ
+++ b/tests/typ/code/ops.typ
@@ -4,7 +4,7 @@
---
// Test template addition.
// Ref: true
-{[*Hello ] + [world!*]}
+{[*Hello ] + [world!]}
---
// Test math operators.