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/simplify-tree/invalid | |
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 '')
9 files changed, 167 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 + |