From ec4f9ba579f6562b963aafb12d385a54185e5b5c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 7 Dec 2014 15:41:52 +0100 Subject: mds-kbdc: compile-layout: some bug fixes and test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- test-files/mds-kbdc/compile-layout/valid/assumption | 1 + .../mds-kbdc/compile-layout/valid/for-if-break-end-dead | 7 +++++++ .../mds-kbdc/compile-layout/valid/for-if-continue-end-dead | 7 +++++++ test-files/mds-kbdc/compile-layout/valid/for-map | 4 ++++ .../compile-layout/valid/let-if-map-end-let-else-map | 13 +++++++++++++ test-files/mds-kbdc/compile-layout/valid/map | 2 ++ test-files/mds-kbdc/compile-layout/valid/reversed_for-map | 4 ++++ 7 files changed, 38 insertions(+) create mode 100644 test-files/mds-kbdc/compile-layout/valid/for-if-break-end-dead create mode 100644 test-files/mds-kbdc/compile-layout/valid/for-if-continue-end-dead create mode 100644 test-files/mds-kbdc/compile-layout/valid/for-map create mode 100644 test-files/mds-kbdc/compile-layout/valid/let-if-map-end-let-else-map create mode 100644 test-files/mds-kbdc/compile-layout/valid/map create mode 100644 test-files/mds-kbdc/compile-layout/valid/reversed_for-map (limited to 'test-files') diff --git a/test-files/mds-kbdc/compile-layout/valid/assumption b/test-files/mds-kbdc/compile-layout/valid/assumption index cf38db9..ebda249 100644 --- a/test-files/mds-kbdc/compile-layout/valid/assumption +++ b/test-files/mds-kbdc/compile-layout/valid/assumption @@ -3,5 +3,6 @@ assumption have " " have_chars ",.-" have_range "a" "z" + have_range "9" "0" end assumption diff --git a/test-files/mds-kbdc/compile-layout/valid/for-if-break-end-dead b/test-files/mds-kbdc/compile-layout/valid/for-if-break-end-dead new file mode 100644 index 0000000..a6a4c6e --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/for-if-break-end-dead @@ -0,0 +1,7 @@ +for "a" to "e" as \1 + if 1 + break + end if + : \1 +end for + diff --git a/test-files/mds-kbdc/compile-layout/valid/for-if-continue-end-dead b/test-files/mds-kbdc/compile-layout/valid/for-if-continue-end-dead new file mode 100644 index 0000000..a98feb7 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/for-if-continue-end-dead @@ -0,0 +1,7 @@ +for "a" to "e" as \1 + if 1 + continue + end if + : \1 +end for + diff --git a/test-files/mds-kbdc/compile-layout/valid/for-map b/test-files/mds-kbdc/compile-layout/valid/for-map new file mode 100644 index 0000000..5d334f6 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/for-map @@ -0,0 +1,4 @@ +for "a" to "e" as \1 + : \1 +end for + diff --git a/test-files/mds-kbdc/compile-layout/valid/let-if-map-end-let-else-map b/test-files/mds-kbdc/compile-layout/valid/let-if-map-end-let-else-map new file mode 100644 index 0000000..9d66433 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/let-if-map-end-let-else-map @@ -0,0 +1,13 @@ +let \1 : "a" +if \equals(\1 "a") + : \1 +else + "\1" : "x" +end if +let \1 : "b" +if \not(\equals(\1 "b")) + "\1" : "x" +else + : \1 +end if + diff --git a/test-files/mds-kbdc/compile-layout/valid/map b/test-files/mds-kbdc/compile-layout/valid/map new file mode 100644 index 0000000..4a906f2 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/map @@ -0,0 +1,2 @@ +"a" : "a" + diff --git a/test-files/mds-kbdc/compile-layout/valid/reversed_for-map b/test-files/mds-kbdc/compile-layout/valid/reversed_for-map new file mode 100644 index 0000000..7ae2062 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/reversed_for-map @@ -0,0 +1,4 @@ +for "e" to "a" as \1 + : \1 +end for + -- cgit v1.2.3-70-g09d2