diff options
Diffstat (limited to 'tests/examplefiles/python/switch_case.txt')
| -rw-r--r-- | tests/examplefiles/python/switch_case.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/examplefiles/python/switch_case.txt b/tests/examplefiles/python/switch_case.txt new file mode 100644 index 00000000..36c34fbd --- /dev/null +++ b/tests/examplefiles/python/switch_case.txt @@ -0,0 +1,23 @@ +match command.split(): + case ['to', direction] if direction in destination.route: + return 1 + case 'foo' | 'bar': + return 2 + case 'raz' as name: + return 3 + case ['to', _]: + return 4 + case else_bar: + return 5 + case _: + return 6 + +match command.split(): + case _Direction(): + return 1 + case _ as default: + return 2 + +case = 1 +match = 1 +match if True else bar |
