summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-17 16:18:36 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-17 16:18:36 +0100
commitdd246e5bc944f90be7ba2981c2b73520a4bfbf45 (patch)
tree0fee09e170431ba88501ee165743a4d7010e6a84 /tests
parent29be90bf95f2ea10c435e7b02f8c26626b956417 (diff)
Spans for group and block contents 📐
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/typ/bracket-call.typ2
-rw-r--r--tests/lang/typ/expressions.typ7
-rw-r--r--tests/lang/typ/let.typ2
-rw-r--r--tests/lang/typ/values.typ8
4 files changed, 11 insertions, 8 deletions
diff --git a/tests/lang/typ/bracket-call.typ b/tests/lang/typ/bracket-call.typ
index 79667e61..7bbaeac1 100644
--- a/tests/lang/typ/bracket-call.typ
+++ b/tests/lang/typ/bracket-call.typ
@@ -71,7 +71,7 @@
---
// Ref: false
// Error: 2:2-2:3 a value of type string is not callable
-#let x = "string";
+#let x = "string"
[x]
// Error: 1:2-1:3 expected function name, found hex value
diff --git a/tests/lang/typ/expressions.typ b/tests/lang/typ/expressions.typ
index 74150c4b..97aa8d81 100644
--- a/tests/lang/typ/expressions.typ
+++ b/tests/lang/typ/expressions.typ
@@ -1,7 +1,7 @@
// Ref: false
-#let a = 2;
-#let b = 4;
+#let a = 2
+#let b = 4
// Paren call.
[eq f(1), "f(1)"]
@@ -30,6 +30,9 @@
[eq (2), 2]
[eq (1+2)*3, 9]
+// Error: 1:3-1:10 cannot add integer and string
+{(1 + "2")}
+
// Confusion with floating-point literal.
[eq 1e+2-1e-2, 99.99]
diff --git a/tests/lang/typ/let.typ b/tests/lang/typ/let.typ
index a966f243..28fc6649 100644
--- a/tests/lang/typ/let.typ
+++ b/tests/lang/typ/let.typ
@@ -5,7 +5,7 @@
[eq x, none]
// Initialized with `1`.
-#let y = 1;
+#let y = 1
[eq y, 1]
// Multiple bindings in one line.
diff --git a/tests/lang/typ/values.typ b/tests/lang/typ/values.typ
index 51d0bd17..cab63044 100644
--- a/tests/lang/typ/values.typ
+++ b/tests/lang/typ/values.typ
@@ -1,15 +1,15 @@
// Test representation of values in the document.
-#let name = "Typst";
-#let ke-bab = "Kebab!";
-#let α = "Alpha";
+#let name = "Typst"
+#let ke-bab = "Kebab!"
+#let α = "Alpha"
// Variables.
{name} \
{ke-bab} \
{α} \
-// Error: 1:1-1:4 unknown variable
+// Error: 1:2-1:3 unknown variable
{_}
// Literal values.