diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-24 00:01:27 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-24 00:35:11 +0200 |
commit | 55c5774be948752665059ba205336e1571b2f057 (patch) | |
tree | 445c1ac6f51aa8b837e1f5234f8253dd442ded6c /modules/gdscript/tests | |
parent | e930c8d3838280e40baabc4426bd8236f7ac50a3 (diff) |
GDScript: Fix range regression
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/for_range_usage.gd | 7 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/for_range_usage.out | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.gd b/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.gd new file mode 100644 index 0000000000..4a7f10f1ee --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.gd @@ -0,0 +1,7 @@ +func test(): + var array := [3, 6, 9] + var result := '' + for i in range(array.size(), 0, -1): + result += str(array[i - 1]) + assert(result == '963') + print('ok') diff --git a/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.out b/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.out new file mode 100644 index 0000000000..1b47ed10dc --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/for_range_usage.out @@ -0,0 +1,2 @@ +GDTEST_OK +ok |