aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test-files/mds-kbdc/validate-tree/invalid/function-macro_call15
-rw-r--r--test-files/mds-kbdc/validate-tree/invalid/function-map22
-rw-r--r--test-files/mds-kbdc/validate-tree/valid/macro-macro_call12
-rw-r--r--test-files/mds-kbdc/validate-tree/valid/macro-map19
-rw-r--r--test-files/mds-kbdc/validate-tree/valid/macro_call6
-rw-r--r--test-files/mds-kbdc/validate-tree/valid/map13
6 files changed, 87 insertions, 0 deletions
diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-macro_call b/test-files/mds-kbdc/validate-tree/invalid/function-macro_call
new file mode 100644
index 0000000..c1ade46
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/invalid/function-macro_call
@@ -0,0 +1,15 @@
+function f/0
+ m()
+end function
+
+# (function (@ 1 0-8) ‘f/0’
+# (.inner
+# (macro_call (@ 2 2-3) ‘m’
+# (.arguments nil)
+# )
+# )
+# )
+# :2:2–3: error: macro call inside function definition
+# m()
+# ^
+
diff --git a/test-files/mds-kbdc/validate-tree/invalid/function-map b/test-files/mds-kbdc/validate-tree/invalid/function-map
new file mode 100644
index 0000000..1768d63
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/invalid/function-map
@@ -0,0 +1,22 @@
+function f/0
+ <dead compose> "a" "e" : "æ"
+end function
+
+# (function (@ 1 0-8) ‘f/0’
+# (.inner
+# (map (@ 2 2-2)
+# (.sequence
+# (keys (@ 2 2-16) ‘<dead compose>’)
+# (string (@ 2 17-20) ‘"a"’)
+# (string (@ 2 21-24) ‘"e"’)
+# )
+# (.result
+# (string (@ 2 27-31) ‘"æ"’)
+# )
+# )
+# )
+# )
+# :2:2–2: error: mapping-statement inside function definition
+# <dead compose> "a" "e" : "æ"
+#
+
diff --git a/test-files/mds-kbdc/validate-tree/valid/macro-macro_call b/test-files/mds-kbdc/validate-tree/valid/macro-macro_call
new file mode 100644
index 0000000..dbd37de
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/valid/macro-macro_call
@@ -0,0 +1,12 @@
+macro m/0
+ n()
+end macro
+
+# (macro (@ 1 0-5) ‘m/0’
+# (.inner
+# (macro_call (@ 2 2-3) ‘n’
+# (.arguments nil)
+# )
+# )
+# )
+
diff --git a/test-files/mds-kbdc/validate-tree/valid/macro-map b/test-files/mds-kbdc/validate-tree/valid/macro-map
new file mode 100644
index 0000000..727c84a
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/valid/macro-map
@@ -0,0 +1,19 @@
+macro m/0
+ <dead compose> "a" "e" : "æ"
+end macro
+
+# (macro (@ 1 0-5) ‘m/0’
+# (.inner
+# (map (@ 2 2-2)
+# (.sequence
+# (keys (@ 2 2-16) ‘<dead compose>’)
+# (string (@ 2 17-20) ‘"a"’)
+# (string (@ 2 21-24) ‘"e"’)
+# )
+# (.result
+# (string (@ 2 27-31) ‘"æ"’)
+# )
+# )
+# )
+# )
+
diff --git a/test-files/mds-kbdc/validate-tree/valid/macro_call b/test-files/mds-kbdc/validate-tree/valid/macro_call
new file mode 100644
index 0000000..788ca76
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/valid/macro_call
@@ -0,0 +1,6 @@
+m()
+
+# (macro_call (@ 1 0-1) ‘m’
+# (.arguments nil)
+# )
+
diff --git a/test-files/mds-kbdc/validate-tree/valid/map b/test-files/mds-kbdc/validate-tree/valid/map
new file mode 100644
index 0000000..29bc43a
--- /dev/null
+++ b/test-files/mds-kbdc/validate-tree/valid/map
@@ -0,0 +1,13 @@
+<dead compose> "a" "e" : "æ"
+
+# (map (@ 1 0-0)
+# (.sequence
+# (keys (@ 1 0-14) ‘<dead compose>’)
+# (string (@ 1 15-18) ‘"a"’)
+# (string (@ 1 19-22) ‘"e"’)
+# )
+# (.result
+# (string (@ 1 25-29) ‘"æ"’)
+# )
+# )
+