aboutsummaryrefslogtreecommitdiffstats
path: root/test-files
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-09 14:38:18 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-09 14:38:18 +0100
commit99ec00b0eb3d7a1250398821680709c4f44fa530 (patch)
tree1deeb83975a17bcb59bd2090db0e75caa9ee8965 /test-files
parentmds-kbdc: compile-layout: watch out for incomplete function calls (diff)
downloadmds-99ec00b0eb3d7a1250398821680709c4f44fa530.tar.gz
mds-99ec00b0eb3d7a1250398821680709c4f44fa530.tar.bz2
mds-99ec00b0eb3d7a1250398821680709c4f44fa530.tar.xz
mds-kbdc: bug fixes and test cases
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'test-files')
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/invalid_strings2
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array3
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds6
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/undefined_variable2
-rw-r--r--test-files/mds-kbdc/make-tree/invalid/invalid_arrays37
5 files changed, 48 insertions, 2 deletions
diff --git a/test-files/mds-kbdc/compile-layout/invalid/invalid_strings b/test-files/mds-kbdc/compile-layout/invalid/invalid_strings
index 93b58e1..676d86e 100644
--- a/test-files/mds-kbdc/compile-layout/invalid/invalid_strings
+++ b/test-files/mds-kbdc/compile-layout/invalid/invalid_strings
@@ -4,8 +4,6 @@
"hello"_
\0.0
"
-"
-\
\
\\
diff --git a/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array b/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array
new file mode 100644
index 0000000..b5f8e32
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/invalid/invalid_use_of_array
@@ -0,0 +1,3 @@
+let \1 : {}
+<letter \1> : "\1"
+
diff --git a/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds b/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds
new file mode 100644
index 0000000..541c5d0
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/invalid/nonsingleton_bounds
@@ -0,0 +1,6 @@
+for "" to "hello" as \1
+end for
+assumption
+ have_range "" "hello"
+end assumption
+
diff --git a/test-files/mds-kbdc/compile-layout/invalid/undefined_variable b/test-files/mds-kbdc/compile-layout/invalid/undefined_variable
new file mode 100644
index 0000000..65f3457
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/invalid/undefined_variable
@@ -0,0 +1,2 @@
+"\1" : ""
+
diff --git a/test-files/mds-kbdc/make-tree/invalid/invalid_arrays b/test-files/mds-kbdc/make-tree/invalid/invalid_arrays
new file mode 100644
index 0000000..2ae4cdf
--- /dev/null
+++ b/test-files/mds-kbdc/make-tree/invalid/invalid_arrays
@@ -0,0 +1,37 @@
+let \1 : {{}}}
+let \1 : {)}
+let \1 : {>}
+
+# (let (@ 1 0-3) ‘\1’
+# (.value
+# (array (@ 1 9-10)
+# (.elements
+# (string (@ 1 10-11) ‘{’)
+# )
+# )
+# )
+# )
+# (let (@ 2 0-3) ‘\1’
+# (.value
+# (array (@ 2 9-10)
+# (.elements nil)
+# )
+# )
+# )
+# (let (@ 3 0-3) ‘\1’
+# (.value
+# (array (@ 3 9-10)
+# (.elements nil)
+# )
+# )
+# )
+# :1:12–14: error: too many parameters
+# let \1 : {{}}}
+# ^^
+# :2:10–11: error: x-stray ‘)’
+# let \1 : {)}
+# ^
+# :3:10–11: error: x-stray ‘>’
+# let \1 : {>}
+# ^
+