From c0083c0f90238f0eec01604dd9c952c8c5dc3c22 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 19 Apr 2021 20:50:52 +0200 Subject: Add dozens of new integration tests to the GDScript test suite This also ignores `.out` files in the file format static checks. --- .../gdscript/tests/scripts/parser/features/match.gd | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/gdscript/tests/scripts/parser/features/match.gd (limited to 'modules/gdscript/tests/scripts/parser/features/match.gd') diff --git a/modules/gdscript/tests/scripts/parser/features/match.gd b/modules/gdscript/tests/scripts/parser/features/match.gd new file mode 100644 index 0000000000..4d05490aa5 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/match.gd @@ -0,0 +1,18 @@ +func test(): + var i = "Hello" + match i: + "Hello": + print("hello") + # This will fall through to the default case below. + continue + "Good bye": + print("bye") + _: + print("default") + + var j = 25 + match j: + 26: + print("This won't match") + _: + print("This will match") -- cgit v1.2.3