aboutsummaryrefslogtreecommitdiffstats
path: root/test-files/mds-kbdc/simplify-tree/valid
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-29 21:18:09 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-29 21:18:14 +0100
commite912254516bedb2d45fff6aa70432146a45d8381 (patch)
treeb3c7b81a7bdbe6807b59a458a81d6de6aea51aae /test-files/mds-kbdc/simplify-tree/valid
parentmds-kbdc: check that there is something after the : (diff)
downloadmds-e912254516bedb2d45fff6aa70432146a45d8381.tar.gz
mds-e912254516bedb2d45fff6aa70432146a45d8381.tar.bz2
mds-e912254516bedb2d45fff6aa70432146a45d8381.tar.xz
mds-kbdc: only five test cases to go before it's time for the next step
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'test-files/mds-kbdc/simplify-tree/valid')
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/alternated_map35
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered4
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation30
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation29
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton14
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/nothing_in_map18
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered24
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation4
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered4
-rw-r--r--test-files/mds-kbdc/simplify-tree/valid/unordered_sequence4
10 files changed, 166 insertions, 0 deletions
diff --git a/test-files/mds-kbdc/simplify-tree/valid/alternated_map b/test-files/mds-kbdc/simplify-tree/valid/alternated_map
new file mode 100644
index 0000000..2668805
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/alternated_map
@@ -0,0 +1,35 @@
+[1 2 3 <key>] : "result"
+
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 1-2) ‘1’)
+# )
+# (.result
+# (string (@ 1 16-24) ‘"result"’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 3-4) ‘2’)
+# )
+# (.result
+# (string (@ 1 16-24) ‘"result"’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 5-6) ‘3’)
+# )
+# (.result
+# (string (@ 1 16-24) ‘"result"’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (keys (@ 1 7-12) ‘<key>’)
+# )
+# (.result
+# (string (@ 1 16-24) ‘"result"’)
+# )
+# )
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered b/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered
new file mode 100644
index 0000000..da3d3d2
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/alternation_inside_unordered
@@ -0,0 +1,4 @@
+(1 [2 3]) : 0
+
+# TODO
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation b/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation
new file mode 100644
index 0000000..434c068
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/map_with_nested_alternation
@@ -0,0 +1,30 @@
+[1 [2 3]] : 4
+
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 1-2) ‘1’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 4-5) ‘2’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 6-7) ‘3’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+# :1:3–4: warning: alternation inside alternation is unnessary
+# [1 [2 3]] : 4
+# ^
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation b/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation
new file mode 100644
index 0000000..498de9e
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/map_with_nothing_in_alternation
@@ -0,0 +1,29 @@
+[1 2 .] 3 : 4
+
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 1-2) ‘1’)
+# (string (@ 1 8-9) ‘3’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 3-4) ‘2’)
+# (string (@ 1 8-9) ‘3’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 8-9) ‘3’)
+# )
+# (.result
+# (string (@ 1 12-13) ‘4’)
+# )
+# )
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton b/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton
new file mode 100644
index 0000000..cfe630d
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/mapping_with_unordered_singleton
@@ -0,0 +1,14 @@
+(1) : 2
+
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 1-2) ‘1’)
+# )
+# (.result
+# (string (@ 1 6-7) ‘2’)
+# )
+# )
+# :1:0–1: warning: singleton unordered subsequence
+# (1) : 2
+# ^
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map
new file mode 100644
index 0000000..25d433d
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_map
@@ -0,0 +1,18 @@
+1 . . 2 : 3
+
+# (map (@ 1 0-0)
+# (.sequence
+# (string (@ 1 0-1) ‘1’)
+# (string (@ 1 6-7) ‘2’)
+# )
+# (.result
+# (string (@ 1 10-11) ‘3’)
+# )
+# )
+# nothing_in_map:1:2–3: warning: ‘.’ outside alternation has no effect
+# 1 . . 2 : 3
+# ^
+# nothing_in_map:1:4–5: warning: ‘.’ outside alternation has no effect
+# 1 . . 2 : 3
+# ^
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered
new file mode 100644
index 0000000..b75c71a
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/nothing_in_unordered
@@ -0,0 +1,24 @@
+(. . . 1) : 2
+
+# (map (@ 1 0-0)
+# (.sequence
+# (unordered (@ 1 0-1)
+# (.inner
+# (string (@ 1 7-8) ‘1’)
+# )
+# )
+# )
+# (.result
+# (string (@ 1 12-13) ‘2’)
+# )
+# )
+# :1:1–2: warning: ‘.’ outside alternation has no effect
+# (. . . 1) : 2
+# ^
+# :1:3–4: warning: ‘.’ outside alternation has no effect
+# (. . . 1) : 2
+# ^
+# :1:5–6: warning: ‘.’ outside alternation has no effect
+# (. . . 1) : 2
+# ^
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation b/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation
new file mode 100644
index 0000000..ac52b62
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation
@@ -0,0 +1,4 @@
+[1 (2 3)] : 0
+
+# TODO
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered
new file mode 100644
index 0000000..ce999a2
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_unordered
@@ -0,0 +1,4 @@
+(1 2 (3 4)) : 0
+
+# TODO
+
diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence
new file mode 100644
index 0000000..a7cb1bf
--- /dev/null
+++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence
@@ -0,0 +1,4 @@
+(1 2 3) : 0
+
+# TODO
+