aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/switch/testscript23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/switch/testscript b/tests/switch/testscript
index 877f640..1399df0 100644
--- a/tests/switch/testscript
+++ b/tests/switch/testscript
@@ -9,7 +9,7 @@
: basics
:
$* <<EOI >>EOO
-for i: 1 2 3 4
+for i: 1 2 3 4 5
{
switch $i
{
@@ -19,9 +19,11 @@ for i: 1 2 3 4
{
print 2
}
- case 5
+ case 0
case 3
- print 3,5
+ print 0,3
+ case 0|4
+ print 0,4
default
print d
}
@@ -29,14 +31,15 @@ for i: 1 2 3 4
EOI
1
2
-3,5
+0,3
+0,4
d
EOO
: basics-multiple
:
$* <<EOI >>EOO
-for i: 1 2 3 4
+for i: 1 2 3 4 5
{
switch $i, $i
{
@@ -49,8 +52,10 @@ for i: 1 2 3 4
print 2
}
case 3, 3
- case 5, 5
- print 3,5
+ case 0, 0
+ print 3,0
+ case 4|0, 0|4|0
+ print 4,0
default
print d
}
@@ -58,11 +63,11 @@ for i: 1 2 3 4
EOI
1
2
-3,5
+3,0
+4,0
d
EOO
-
: empty
:
$* <<EOI