summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts/parser/features
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2022-12-28 04:34:00 +0200
committerDmitrii Maganov <vonagam@gmail.com>2023-01-08 20:18:46 +0200
commit71f7c8a9d3dcab04223b377a422637c4cedffca0 (patch)
tree6dccea8ff12c626fd97c770ac9a6d11336f488a9 /modules/gdscript/tests/scripts/parser/features
parentb6e06038f8a373f7fb8d26e92d5f06887e459598 (diff)
GDScript: Fix multiline and trailing comma for assert
Diffstat (limited to 'modules/gdscript/tests/scripts/parser/features')
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_assert.gd24
-rw-r--r--modules/gdscript/tests/scripts/parser/features/multiline_assert.out2
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd b/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd
new file mode 100644
index 0000000000..8c699c604d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd
@@ -0,0 +1,24 @@
+func test():
+ var x := 5
+
+ assert(x > 0)
+ assert(x > 0,)
+ assert(x > 0, 'message')
+ assert(x > 0, 'message',)
+
+ assert(
+ x > 0
+ )
+ assert(
+ x > 0,
+ )
+ assert(
+ x > 0,
+ 'message'
+ )
+ assert(
+ x > 0,
+ 'message',
+ )
+
+ print('OK')
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_assert.out b/modules/gdscript/tests/scripts/parser/features/multiline_assert.out
new file mode 100644
index 0000000000..1ccb591560
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/multiline_assert.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+OK