summaryrefslogtreecommitdiff
path: root/tests/typ/expr/call-invalid.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-02-20 17:53:40 +0100
committerLaurenz <laurmaedje@gmail.com>2021-02-20 23:34:33 +0100
commit05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 (patch)
tree6c0b66eb2a9dff224cb39eb6ccb478656a706c04 /tests/typ/expr/call-invalid.typ
parent927341d93ae29678095e3b874bd68bfc57d4bc05 (diff)
Reorganize tests 🔀
Diffstat (limited to 'tests/typ/expr/call-invalid.typ')
-rw-r--r--tests/typ/expr/call-invalid.typ44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/typ/expr/call-invalid.typ b/tests/typ/expr/call-invalid.typ
new file mode 100644
index 00000000..0ed5246f
--- /dev/null
+++ b/tests/typ/expr/call-invalid.typ
@@ -0,0 +1,44 @@
+// Test invalid function calls.
+
+---
+// Error: 1-2 unexpected invalid token
+#
+
+---
+// Error: 7-8 expected expression, found colon
+#args(:)
+
+// Error: 10-12 expected expression, found end of block comment
+#args(a:1*/)
+
+// Error: 8 expected comma
+#args(1 2)
+
+// Error: 2:7-2:8 expected identifier
+// Error: 1:9 expected expression
+#args(1:)
+
+// Error: 7-8 expected identifier
+#args(1:2)
+
+// Error: 7-10 expected identifier
+{args((x):1)}
+
+---
+#let x = "string"
+
+// Error: 1-3 expected function, found string
+#x()
+
+---
+// Error: 3:1 expected closing bracket
+#args[`a]`
+
+---
+// Error: 7 expected closing paren
+{args(}
+
+---
+// Error: 3:1 expected quote
+// Error: 2:1 expected closing paren
+#args("]