diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-11-29 21:18:09 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-11-29 21:18:14 +0100 |
commit | e912254516bedb2d45fff6aa70432146a45d8381 (patch) | |
tree | b3c7b81a7bdbe6807b59a458a81d6de6aea51aae /test-files/mds-kbdc | |
parent | mds-kbdc: check that there is something after the : (diff) | |
download | mds-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')
19 files changed, 333 insertions, 0 deletions
diff --git a/test-files/mds-kbdc/simplify-tree/invalid/alternated_value_statement b/test-files/mds-kbdc/simplify-tree/invalid/alternated_value_statement new file mode 100644 index 0000000..fae3bc1 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/alternated_value_statement @@ -0,0 +1,18 @@ +[1 2] + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result nil) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 3-4) ‘2’) +# ) +# (.result nil) +# ) +# :1:0–1: warning: alternated value statement is undefined unless the alternatives are identical +# [1 2] +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/double_value b/test-files/mds-kbdc/simplify-tree/invalid/double_value new file mode 100644 index 0000000..d9d4969 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/double_value @@ -0,0 +1,13 @@ +"a" "b" + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 0-3) ‘"a"’) +# (string (@ 1 4-7) ‘"b"’) +# ) +# (.result nil) +# ) +# :1:4–7: error: more the one value in value statement +# "a" "b" +# ^^^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/empty_unordered b/test-files/mds-kbdc/simplify-tree/invalid/empty_unordered new file mode 100644 index 0000000..c81b1d1 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/empty_unordered @@ -0,0 +1,12 @@ +() : "a" + +# (map (@ 1 0-0) +# (.sequence nil) +# (.result +# (string (@ 1 5-8) ‘"a"’) +# ) +# ) +# :1:0–1: error: empty unordered subsequence +# () : "a" +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/long_double_unordered b/test-files/mds-kbdc/simplify-tree/invalid/long_double_unordered new file mode 100644 index 0000000..2a2e673 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/long_double_unordered @@ -0,0 +1,25 @@ +# Note this should pass if complied with --force + +( ( 1 2 3 4 5 6 ) ) : 0 + +# (map (@ 3 0-0) +# (.sequence +# (unordered (@ 3 0-3) +# (.inner +# (string (@ 3 4-5) ‘1’) +# (string (@ 3 6-7) ‘2’) +# (string (@ 3 8-9) ‘3’) +# (string (@ 3 10-11) ‘4’) +# (string (@ 3 12-13) ‘5’) +# (string (@ 3 14-15) ‘6’) +# ) +# ) +# ) +# (.result +# (string (@ 3 22-23) ‘0’) +# ) +# ) +# :3:4–5: error: unordered subsequence of size 6 found, requires ‘--force’ to compile +# ( ( 1 2 3 4 5 6 ) ) : 0 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/long_single_unordered b/test-files/mds-kbdc/simplify-tree/invalid/long_single_unordered new file mode 100644 index 0000000..38751e5 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/long_single_unordered @@ -0,0 +1,23 @@ +(1 2 3 4 5 6) : 0 + +# (map (@ 1 0-0) +# (.sequence +# (unordered (@ 1 0-1) +# (.inner +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 5-6) ‘3’) +# (string (@ 1 7-8) ‘4’) +# (string (@ 1 9-10) ‘5’) +# (string (@ 1 11-12) ‘6’) +# ) +# ) +# ) +# (.result +# (string (@ 1 16-17) ‘0’) +# ) +# ) +# :1:1–2: error: unordered subsequence longer than 5 elements need double brackets +# (1 2 3 4 5 6) : 0 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_alternation b/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_alternation new file mode 100644 index 0000000..6838035 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_alternation @@ -0,0 +1,28 @@ +[1 .] . . : 2 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 12-13) ‘2’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (nothing (@ 1 3-4)) +# ) +# (.result +# (string (@ 1 12-13) ‘2’) +# ) +# ) +# :1:6–7: warning: ‘.’ outside alternation has no effect +# [1 .] . . : 2 +# ^ +# :1:8–9: warning: ‘.’ outside alternation has no effect +# [1 .] . . : 2 +# ^ +# :1:3–4: error: mapping of null sequence +# [1 .] . . : 2 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_emptyness b/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_emptyness new file mode 100644 index 0000000..22f6824 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/map_from_nothingness_by_emptyness @@ -0,0 +1,26 @@ +() : 1 +[] : 2 + +# (map (@ 1 0-0) +# (.sequence +# (nothing (@ 1 0-1)) +# ) +# (.result +# (string (@ 1 5-6) ‘1’) +# ) +# ) +# (map (@ 2 0-0) +# (.sequence +# (nothing (@ 2 0-1)) +# ) +# (.result +# (string (@ 2 5-6) ‘2’) +# ) +# ) +# :1:0–1: error: empty unordered subsequence +# () : 1 +# ^ +# :2:0–1: error: empty alternation +# [] : 2 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/nothing_but_nothing_in_unordered b/test-files/mds-kbdc/simplify-tree/invalid/nothing_but_nothing_in_unordered new file mode 100644 index 0000000..d7bfbf3 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/nothing_but_nothing_in_unordered @@ -0,0 +1,18 @@ +(. .) : 1 + +# (map (@ 1 0-0) +# (.sequence nil) +# (.result +# (string (@ 1 8-9) ‘1’) +# ) +# ) +# :1:1–2: warning: ‘.’ outside alternation has no effect +# (. .) : 1 +# ^ +# :1:3–4: warning: ‘.’ outside alternation has no effect +# (. .) : 1 +# ^ +# :1:0–1: error: unordered subsequence contained nothing else than ‘.’ +# (. .) : 1 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/invalid/unordered_double_value b/test-files/mds-kbdc/simplify-tree/invalid/unordered_double_value new file mode 100644 index 0000000..3a253d7 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/invalid/unordered_double_value @@ -0,0 +1,4 @@ +(1 2) + +# TODO + 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 + |