diff options
Diffstat (limited to 'tests/manual/v4/switch.1.js')
-rw-r--r-- | tests/manual/v4/switch.1.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/manual/v4/switch.1.js b/tests/manual/v4/switch.1.js new file mode 100644 index 0000000000..ca29b5f5de --- /dev/null +++ b/tests/manual/v4/switch.1.js @@ -0,0 +1,16 @@ + +function test(a) { + switch (a) { + default: return "cool" + case "xxx": print("got zero"); break; + case "ciao": case "ciao2": return 123 + case "hello": return 321 + } + return 444 +} + +print(test("xxx")) +print(test("hello")) +print(test("ciao")) +print(test("ciao2")) +print(test(9)) |