summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/parse/bad-crlf.txt2
-rw-r--r--test/parse/bad-error-long-line.txt2
-rw-r--r--test/parse/bad-error-long-token.txt2
-rw-r--r--test/parse/bad-single-semicolon.txt2
-rw-r--r--test/parse/bad-toplevel.txt2
-rw-r--r--test/parse/empty-file.txt2
-rw-r--r--test/parse/module/bad-module-multi.txt10
-rw-r--r--test/parse/module/bad-module-with-assert.txt10
8 files changed, 26 insertions, 6 deletions
diff --git a/test/parse/bad-crlf.txt b/test/parse/bad-crlf.txt
index 207bfdce..ddf2676e 100644
--- a/test/parse/bad-crlf.txt
+++ b/test/parse/bad-crlf.txt
@@ -2,7 +2,7 @@
modulez
funcz
(;; STDERR ;;;
-out/test/parse/bad-crlf.txt:2:1: error: unexpected token "modulez", expected a module field or a command.
+out/test/parse/bad-crlf.txt:2:1: error: unexpected token "modulez", expected a module field or a module.
modulez
^^^^^^^
out/test/parse/bad-crlf.txt:3:1: error: unexpected token funcz, expected EOF.
diff --git a/test/parse/bad-error-long-line.txt b/test/parse/bad-error-long-line.txt
index 451ac6fd..2f699c4e 100644
--- a/test/parse/bad-error-long-line.txt
+++ b/test/parse/bad-error-long-line.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
whoops (; some text at the end of the line ;)
(;; STDERR ;;;
-out/test/parse/bad-error-long-line.txt:2:170: error: unexpected token "whoops", expected a module field or a command.
+out/test/parse/bad-error-long-line.txt:2:170: error: unexpected token "whoops", expected a module field or a module.
... whoops (; some text...
^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/bad-error-long-token.txt b/test/parse/bad-error-long-token.txt
index 5236637d..ca5fbf0a 100644
--- a/test/parse/bad-error-long-token.txt
+++ b/test/parse/bad-error-long-token.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
(;; STDERR ;;;
-out/test/parse/bad-error-long-token.txt:2:15: error: unexpected token "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", expected a module field or a command.
+out/test/parse/bad-error-long-token.txt:2:15: error: unexpected token "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", expected a module field or a module.
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;;; STDERR ;;)
diff --git a/test/parse/bad-single-semicolon.txt b/test/parse/bad-single-semicolon.txt
index 18ab20d8..fe67eea0 100644
--- a/test/parse/bad-single-semicolon.txt
+++ b/test/parse/bad-single-semicolon.txt
@@ -5,7 +5,7 @@
out/test/parse/bad-single-semicolon.txt:2:1: error: unexpected char
; foo bar
^
-out/test/parse/bad-single-semicolon.txt:2:3: error: unexpected token "foo", expected a module field or a command.
+out/test/parse/bad-single-semicolon.txt:2:3: error: unexpected token "foo", expected a module field or a module.
; foo bar
^^^
out/test/parse/bad-single-semicolon.txt:2:7: error: unexpected token bar, expected EOF.
diff --git a/test/parse/bad-toplevel.txt b/test/parse/bad-toplevel.txt
index 9459b88e..ebf78714 100644
--- a/test/parse/bad-toplevel.txt
+++ b/test/parse/bad-toplevel.txt
@@ -1,7 +1,7 @@
;;; ERROR: 1
(foo bar)
(;; STDERR ;;;
-out/test/parse/bad-toplevel.txt:2:2: error: unexpected token "foo", expected a module field or a command.
+out/test/parse/bad-toplevel.txt:2:2: error: unexpected token "foo", expected a module field or a module.
(foo bar)
^^^
out/test/parse/bad-toplevel.txt:2:6: error: unexpected token bar, expected EOF.
diff --git a/test/parse/empty-file.txt b/test/parse/empty-file.txt
index 0d021226..bdd75938 100644
--- a/test/parse/empty-file.txt
+++ b/test/parse/empty-file.txt
@@ -1,5 +1,5 @@
;;; ERROR: 1
;; empty file
(;; STDERR ;;;
-out/test/parse/empty-file.txt:3:2: error: unexpected token "EOF", expected a module field or a command.
+out/test/parse/empty-file.txt:3:2: error: unexpected token "EOF", expected a module field or a module.
;;; STDERR ;;)
diff --git a/test/parse/module/bad-module-multi.txt b/test/parse/module/bad-module-multi.txt
new file mode 100644
index 00000000..10d8102a
--- /dev/null
+++ b/test/parse/module/bad-module-multi.txt
@@ -0,0 +1,10 @@
+;;; ERROR: 1
+(module (func))
+
+;; Can't have two modules in a .wat file.
+(module)
+(;; STDERR ;;;
+out/test/parse/module/bad-module-multi.txt:5:1: error: unexpected token (, expected EOF.
+(module)
+^
+;;; STDERR ;;)
diff --git a/test/parse/module/bad-module-with-assert.txt b/test/parse/module/bad-module-with-assert.txt
new file mode 100644
index 00000000..5145f611
--- /dev/null
+++ b/test/parse/module/bad-module-with-assert.txt
@@ -0,0 +1,10 @@
+;;; ERROR: 1
+(module (func (export "f")))
+
+;; Can't use assert_return when parsing a .wat file.
+(assert_return (invoke "f"))
+(;; STDERR ;;;
+out/test/parse/module/bad-module-with-assert.txt:5:1: error: unexpected token (, expected EOF.
+(assert_return (invoke "f"))
+^
+;;; STDERR ;;)