diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2023-08-07 12:23:02 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2023-08-17 10:54:43 +0300 |
commit | 00ad9e484e2e8491007bc7d2adfaf0598c970afc (patch) | |
tree | ee25f40610caca9b37c908cd7d73f2403b7cafe6 /modules/gdscript/tests | |
parent | 16a93563bfd3b02ca0a8f6df2026f3a3217f5571 (diff) | |
download | redot-engine-00ad9e484e2e8491007bc7d2adfaf0598c970afc.tar.gz |
GDScript: Allow mixed indentation on blank lines
Diffstat (limited to 'modules/gdscript/tests')
3 files changed, 26 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/.editorconfig b/modules/gdscript/tests/scripts/parser/.editorconfig new file mode 100644 index 0000000000..fa43b3ad78 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/.editorconfig @@ -0,0 +1,2 @@ +[*.{gd,out}] +trim_trailing_whitespace = false diff --git a/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.gd b/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.gd new file mode 100644 index 0000000000..7ee2708999 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.gd @@ -0,0 +1,20 @@ +# Empty line: + + +# Comment line: + # Comment. + +func test(): + print(1) + + if true: + + # Empty line: + + + print(2) + + # Comment line: + # Comment. + + print(3) diff --git a/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.out b/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.out new file mode 100644 index 0000000000..c40e402ba3 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines.out @@ -0,0 +1,4 @@ +GDTEST_OK +1 +2 +3 |