diff --git a/tests/ifelif.expected b/tests/ifelif.expected new file mode 100644 index 0000000..8dffdb0 --- /dev/null +++ b/tests/ifelif.expected @@ -0,0 +1,3 @@ +"if/ef: if block" +"if/ef: ef block" +nil diff --git a/tests/ifelif.rl b/tests/ifelif.rl new file mode 100644 index 0000000..0a3395e --- /dev/null +++ b/tests/ifelif.rl @@ -0,0 +1,10 @@ +i = 0 +while (i<2) + if (i==0) + puts("if/elif: if block") + elif (i==1) + puts("if/elif: elif block") + end + + i = i+1 +end diff --git a/tests/ifelifelifelse.expected b/tests/ifelifelifelse.expected new file mode 100644 index 0000000..ba44723 --- /dev/null +++ b/tests/ifelifelifelse.expected @@ -0,0 +1,5 @@ +"if/ef/el: if block" +"if/ef/ef/el: first ef block" +"if/ef/ef/el: second ef block" +"if/ef/else: else block" +nil diff --git a/tests/ifelifelifelse.rl b/tests/ifelifelifelse.rl new file mode 100644 index 0000000..0bccff2 --- /dev/null +++ b/tests/ifelifelifelse.rl @@ -0,0 +1,14 @@ +i = 0 +while (i<4) + if (i==0) + puts("if/elif/el: if block") + elif (i==1) + puts("if/elif/elif/el: first elif block") + elif (i==2) + puts("if/elif/elif/el: second elif block") + else + puts("if/elif/else: else block") + end + + i = i+1 +end diff --git a/tests/ifelifelse.expected b/tests/ifelifelse.expected new file mode 100644 index 0000000..d86978e --- /dev/null +++ b/tests/ifelifelse.expected @@ -0,0 +1,4 @@ +"if/ef/el: if block" +"if/ef/el: ef block" +"if/ef/el: else block" +nil diff --git a/tests/ifelifelse.rl b/tests/ifelifelse.rl new file mode 100644 index 0000000..21d863f --- /dev/null +++ b/tests/ifelifelse.rl @@ -0,0 +1,12 @@ +i = 0 +while (i<3) + if (i==0) + puts("if/elif/el: if block") + elif (i==1) + puts("if/elif/el: elif block") + else + puts("if/elif/el: else block") + end + + i = i+1 +end