summaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/ref/call-invalid.pngbin1766 -> 1729 bytes
-rw-r--r--tests/lang/ref/for-invalid.pngbin1484 -> 1653 bytes
-rw-r--r--tests/lang/typ/block-invalid.typ2
-rw-r--r--tests/lang/typ/call-invalid.typ4
-rw-r--r--tests/lang/typ/call-value.typ2
-rw-r--r--tests/lang/typ/comment.typ2
-rw-r--r--tests/lang/typ/emph.typ2
-rw-r--r--tests/lang/typ/expr-invalid.typ10
-rw-r--r--tests/lang/typ/expr-prec.typ2
-rw-r--r--tests/lang/typ/for-invalid.typ4
-rw-r--r--tests/lang/typ/if-invalid.typ2
11 files changed, 15 insertions, 15 deletions
diff --git a/tests/lang/ref/call-invalid.png b/tests/lang/ref/call-invalid.png
index 0bceebc1..05db4b7e 100644
--- a/tests/lang/ref/call-invalid.png
+++ b/tests/lang/ref/call-invalid.png
Binary files differ
diff --git a/tests/lang/ref/for-invalid.png b/tests/lang/ref/for-invalid.png
index fa65f495..d758aa95 100644
--- a/tests/lang/ref/for-invalid.png
+++ b/tests/lang/ref/for-invalid.png
Binary files differ
diff --git a/tests/lang/typ/block-invalid.typ b/tests/lang/typ/block-invalid.typ
index 28874861..d98bf06b 100644
--- a/tests/lang/typ/block-invalid.typ
+++ b/tests/lang/typ/block-invalid.typ
@@ -20,7 +20,7 @@
// Error: 9-12 expected identifier, found string
for "v"
- // Error: 10 expected keyword `#in`
+ // Error: 10 expected keyword `in`
for v let z = 1 + 2
z
diff --git a/tests/lang/typ/call-invalid.typ b/tests/lang/typ/call-invalid.typ
index a04f5959..153f7a39 100644
--- a/tests/lang/typ/call-invalid.typ
+++ b/tests/lang/typ/call-invalid.typ
@@ -7,7 +7,7 @@
---
#let x = "string"
-// Error: 2-3 expected function, found string
+// Error: 1-3 expected function, found string
#x()
---
@@ -20,5 +20,5 @@
---
// Error: 3:1 expected quote
-// Error: 2:1 expected closing bracket
+// Error: 2:1 expected closing paren
#f("]
diff --git a/tests/lang/typ/call-value.typ b/tests/lang/typ/call-value.typ
index 0e257717..26e48d0f 100644
--- a/tests/lang/typ/call-value.typ
+++ b/tests/lang/typ/call-value.typ
@@ -2,7 +2,7 @@
// Ref: false
---
-// Whitespace is insignificant.
+// Whitespace is significant.
#test(type(1), "integer")
#test (type (1), "integer")
diff --git a/tests/lang/typ/comment.typ b/tests/lang/typ/comment.typ
index e5892453..25180211 100644
--- a/tests/lang/typ/comment.typ
+++ b/tests/lang/typ/comment.typ
@@ -11,7 +11,7 @@ C/*
*/D
// Works in code.
-#test(type /*1*/ (1) //
+#test(type(/*1*/ 1) //
, "integer")
---
diff --git a/tests/lang/typ/emph.typ b/tests/lang/typ/emph.typ
index 8e5812a8..772e15ab 100644
--- a/tests/lang/typ/emph.typ
+++ b/tests/lang/typ/emph.typ
@@ -8,7 +8,7 @@ _Emphasized!_
Partly em_phas_ized.
// Scoped to body.
-#[box][_Scoped] to body.
+#box[_Scoped] to body.
// Unterminated is fine.
_The End
diff --git a/tests/lang/typ/expr-invalid.typ b/tests/lang/typ/expr-invalid.typ
index 329a2616..f760ae31 100644
--- a/tests/lang/typ/expr-invalid.typ
+++ b/tests/lang/typ/expr-invalid.typ
@@ -35,22 +35,22 @@
// Error: 1:31-1:39 cannot divide integer by length
{(1 + "2", 40% - 1, 2 * true, 3 / 12pt)}
-// Error: 15-23 cannot apply '+=' to integer and string
+// Error: 14-22 cannot apply '+=' to integer and string
{ let x = 1; x += "2" }
---
// Bad left-hand sides of assignment.
-// Error: 1:3-1:6 cannot assign to this expression
+// Error: 3-6 cannot assign to this expression
{ (x) = "" }
-// Error: 1:3-1:8 cannot assign to this expression
+// Error: 3-8 cannot assign to this expression
{ 1 + 2 += 3 }
-// Error: 1:3-1:4 unknown variable
+// Error: 3-4 unknown variable
{ z = 1 }
-// Error: 1:3-1:6 cannot assign to a constant
+// Error: 3-6 cannot assign to a constant
{ box = "hi" }
// Works if we define box beforehand
diff --git a/tests/lang/typ/expr-prec.typ b/tests/lang/typ/expr-prec.typ
index 738e8fdf..e64e583c 100644
--- a/tests/lang/typ/expr-prec.typ
+++ b/tests/lang/typ/expr-prec.typ
@@ -21,7 +21,7 @@
#test((1), 1)
#test((1+2)*-3, -9)
-// Error: 15 expected closing paren
+// Error: 14 expected closing paren
#test({(1 + 1}, 2)
---
diff --git a/tests/lang/typ/for-invalid.typ b/tests/lang/typ/for-invalid.typ
index 3866909f..c8bdebdd 100644
--- a/tests/lang/typ/for-invalid.typ
+++ b/tests/lang/typ/for-invalid.typ
@@ -4,7 +4,7 @@
// Error: 5-5 expected identifier
#for
-// Error: 7-7 expected keyword `#in`
+// Error: 7-7 expected keyword `in`
#for v
// Error: 10-10 expected expression
@@ -28,5 +28,5 @@ A#for "v" thing.
#for "v" in iter {}
// Should output `+ b in iter`.
-// Error: 7 expected keyword `#in`
+// Error: 7 expected keyword `in`
#for a + b in iter {}
diff --git a/tests/lang/typ/if-invalid.typ b/tests/lang/typ/if-invalid.typ
index 166de122..6d2deab1 100644
--- a/tests/lang/typ/if-invalid.typ
+++ b/tests/lang/typ/if-invalid.typ
@@ -10,7 +10,7 @@
// Error: 6 expected body
#if x
-// Error: 1-6 unexpected keyword `#else`
+// Error: 1-6 unexpected keyword `else`
#else {}
---