summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser/features
diff options
context:
space:
mode:
authorcdemirer <41021322+cdemirer@users.noreply.github.com>2022-04-04 15:47:08 +0800
committercdemirer <41021322+cdemirer@users.noreply.github.com>2022-04-04 15:47:08 +0800
commit3c5b9d1be3db1ee2657ec10fc316b97a65c03542 (patch)
tree1d0867ea1ab3fd6035ea7d79dc77ba1e37c7bc13 /modules/gdscript/tests/scripts/parser/features
parentc630c2001dbe2e25e0d372bd22ce85cdc2822eb0 (diff)
Fix issues with multiple bind patterns in match statement
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/features')
-rw-r--r--modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out4
2 files changed, 10 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd
new file mode 100644
index 0000000000..a0ae7fb17c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.gd
@@ -0,0 +1,6 @@
+func test():
+ match [1, 2, 3]:
+ [var a, var b, var c]:
+ print(a == 1)
+ print(b == 2)
+ print(c == 3)
diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out
new file mode 100644
index 0000000000..316db6d748
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_variable_binds_in_pattern.out
@@ -0,0 +1,4 @@
+GDTEST_OK
+true
+true
+true