diff options
Diffstat (limited to 'test-files/mds-kbdc/validate-tree/invalid')
6 files changed, 133 insertions, 0 deletions
diff --git a/test-files/mds-kbdc/validate-tree/invalid/for-return b/test-files/mds-kbdc/validate-tree/invalid/for-return new file mode 100644 index 0000000..af59736 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/for-return @@ -0,0 +1,13 @@ +for 1 to 9 as \1 + return +end for + +# (for (@ 1 0-3) ‘1’ ‘9’ (.variable ‘\1’) +# (.inner +# (return (@ 2 2-8)) +# ) +# ) +# :2:2–8: error: ‘return’ outside function and macro definition +# return +# ^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/if-else-break b/test-files/mds-kbdc/validate-tree/invalid/if-else-break new file mode 100644 index 0000000..0e8ae81 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/if-else-break @@ -0,0 +1,22 @@ +if 1 + if 0 + else + break + end if +end if + +# (if (@ 1 0-2) ‘1’ +# (.inner +# (if (@ 2 2-4) ‘0’ +# (.inner nil) +# (.otherwise +# (break (@ 4 4-9)) +# ) +# ) +# ) +# (.otherwise nil) +# ) +# :4:4–9: error: ‘break’ outside ‘for’ +# break +# ^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/misplaced_assumption b/test-files/mds-kbdc/validate-tree/invalid/misplaced_assumption new file mode 100644 index 0000000..904ffd5 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/misplaced_assumption @@ -0,0 +1,46 @@ +have <space> +have_chars " " +have_range "a" "z" +information + have <space> + have_chars " " + have_range "a" "z" +end information + +# (have (@ 1 0-4) +# (.data +# (keys (@ 1 5-12) ‘<space>’) +# ) +# ) +# (have_chars (@ 2 0-10) ‘" "’) +# (have_range (@ 3 0-10) ‘"a"’ ‘"z"’) +# (information (@ 4 0-11) +# (.inner +# (have (@ 5 2-6) +# (.data +# (keys (@ 5 7-14) ‘<space>’) +# ) +# ) +# (have_chars (@ 6 2-12) ‘" "’) +# (have_range (@ 7 2-12) ‘"a"’ ‘"z"’) +# ) +# ) +# :1:0–4: error: assumption outside assumption clause +# have <space> +# ^^^^ +# :2:0–10: error: assumption outside assumption clause +# have_chars " " +# ^^^^^^^^^^ +# :3:0–10: error: assumption outside assumption clause +# have_range "a" "z" +# ^^^^^^^^^^ +# :5:2–6: error: assumption outside assumption clause +# have <space> +# ^^^^ +# :6:2–12: error: assumption outside assumption clause +# have_chars " " +# ^^^^^^^^^^ +# :7:2–12: error: assumption outside assumption clause +# have_range "a" "z" +# ^^^^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/misplaced_information b/test-files/mds-kbdc/validate-tree/invalid/misplaced_information new file mode 100644 index 0000000..248a212 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/misplaced_information @@ -0,0 +1,38 @@ +language "" +country "" +variant "" +assumption + language "" + country "" + variant "" +end assumption + +# (language (@ 1 0-8) ‘""’) +# (country (@ 2 0-7) ‘""’) +# (variant (@ 3 0-7) ‘""’) +# (assumption (@ 4 0-10) +# (.inner +# (language (@ 5 2-10) ‘""’) +# (country (@ 6 2-9) ‘""’) +# (variant (@ 7 2-9) ‘""’) +# ) +# ) +# :1:0–8: error: information outside information clause +# language "" +# ^^^^^^^^ +# :2:0–7: error: information outside information clause +# country "" +# ^^^^^^^ +# :3:0–7: error: information outside information clause +# variant "" +# ^^^^^^^ +# :5:2–10: error: information outside information clause +# language "" +# ^^^^^^^^ +# :6:2–9: error: information outside information clause +# country "" +# ^^^^^^^ +# :7:2–9: error: information outside information clause +# variant "" +# ^^^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/runaway_break b/test-files/mds-kbdc/validate-tree/invalid/runaway_break new file mode 100644 index 0000000..0e9911d --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/runaway_break @@ -0,0 +1,7 @@ +break + +# (break (@ 1 0-5)) +# :1:0–5: error: ‘break’ outside ‘for’ +# break +# ^^^^^ + diff --git a/test-files/mds-kbdc/validate-tree/invalid/runaway_continue b/test-files/mds-kbdc/validate-tree/invalid/runaway_continue new file mode 100644 index 0000000..a68b7e4 --- /dev/null +++ b/test-files/mds-kbdc/validate-tree/invalid/runaway_continue @@ -0,0 +1,7 @@ +continue + +# (continue (@ 1 0-8)) +# :1:0–8: error: ‘continue’ outside ‘for’ +# continue +# ^^^^^^^^ + |