diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2023-01-11 01:10:10 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-11 01:10:10 +0100 | 
| commit | 5eb161a9c8eb210d461178a7ea5b6368956b45ca (patch) | |
| tree | 76953a5eaf2bef8c24456fce1b541d691577f940 /modules/gdscript/tests/scripts/parser | |
| parent | c2f96a8b837de99c76db55a30f950c337b7637eb (diff) | |
| parent | 44d1d72af19ff7874704fa88d7d08fe4f782c9db (diff) | |
Merge pull request #70595 from adamscott/add-gdscript-editorconfig
Add GDScript `.editorconfig` rules
Diffstat (limited to 'modules/gdscript/tests/scripts/parser')
9 files changed, 126 insertions, 126 deletions
| diff --git a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd index ada6030132..179e454073 100644 --- a/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd +++ b/modules/gdscript/tests/scripts/parser/errors/class_name_after_annotation.gd @@ -3,4 +3,4 @@  class_name HelloWorld  func test(): -    pass +	pass diff --git a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd index 92dfb2366d..816783f239 100644 --- a/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd +++ b/modules/gdscript/tests/scripts/parser/errors/double_dictionary_comma.gd @@ -1,2 +1,2 @@  func test(): -    var dictionary = { hello = "world",, } +	var dictionary = { hello = "world",, } diff --git a/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd index 4608c778aa..7a745bd995 100644 --- a/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd +++ b/modules/gdscript/tests/scripts/parser/errors/match_multiple_variable_binds_in_branch.gd @@ -1,4 +1,4 @@  func test(): -    match 1: -        [[[var a]]], 2: -            pass +	match 1: +		[[[var a]]], 2: +			pass diff --git a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd index 43b513045b..a7197bf68f 100644 --- a/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd +++ b/modules/gdscript/tests/scripts/parser/features/advanced_expression_matching.gd @@ -1,34 +1,34 @@  func foo(x): -    match x: -        1 + 1: -            print("1+1") -        [1,2,[1,{1:2,2:var z,..}]]: -            print("[1,2,[1,{1:2,2:var z,..}]]") -            print(z) -        1 if true else 2: -            print("1 if true else 2") -        1 < 2: -            print("1 < 2") -        1 or 2 and 1: -            print("1 or 2 and 1") -        6 | 1: -            print("1 | 1") -        1 >> 1: -            print("1 >> 1") -        1, 2 or 3, 4: -            print("1, 2 or 3, 4") -        _: -            print("wildcard") +	match x: +		1 + 1: +			print("1+1") +		[1,2,[1,{1:2,2:var z,..}]]: +			print("[1,2,[1,{1:2,2:var z,..}]]") +			print(z) +		1 if true else 2: +			print("1 if true else 2") +		1 < 2: +			print("1 < 2") +		1 or 2 and 1: +			print("1 or 2 and 1") +		6 | 1: +			print("1 | 1") +		1 >> 1: +			print("1 >> 1") +		1, 2 or 3, 4: +			print("1, 2 or 3, 4") +		_: +			print("wildcard")  func test(): -    foo(6 | 1) -    foo(1 >> 1) -    foo(2) -    foo(1) -    foo(1+1) -    foo(1 < 2) -    foo([2, 1]) -    foo(4) -    foo([1, 2, [1, {1 : 2, 2:3}]]) -    foo([1, 2, [1, {1 : 2, 2:[1,3,5, "123"], 4:2}]]) -    foo([1, 2, [1, {1 : 2}]]) +	foo(6 | 1) +	foo(1 >> 1) +	foo(2) +	foo(1) +	foo(1+1) +	foo(1 < 2) +	foo([2, 1]) +	foo(4) +	foo([1, 2, [1, {1 : 2, 2:3}]]) +	foo([1, 2, [1, {1 : 2, 2:[1,3,5, "123"], 4:2}]]) +	foo([1, 2, [1, {1 : 2}]]) diff --git a/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd index 2b46f1e88a..c959c6c6af 100644 --- a/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd +++ b/modules/gdscript/tests/scripts/parser/features/basic_expression_matching.gd @@ -1,27 +1,27 @@  func foo(x): -    match x: -        1: -            print("1") -        2: -            print("2") -        [1, 2]: -            print("[1, 2]") -        3 or 4: -            print("3 or 4") -        4: -            print("4") -        {1 : 2, 2 : 3}: -            print("{1 : 2, 2 : 3}") -        _: -            print("wildcard") +	match x: +		1: +			print("1") +		2: +			print("2") +		[1, 2]: +			print("[1, 2]") +		3 or 4: +			print("3 or 4") +		4: +			print("4") +		{1 : 2, 2 : 3}: +			print("{1 : 2, 2 : 3}") +		_: +			print("wildcard")  func test(): -    foo(0) -    foo(1) -    foo(2) -    foo([1, 2]) -    foo(3) -    foo(4) -    foo([4,4]) -    foo({1 : 2, 2 : 3}) -    foo({1 : 2, 4 : 3}) +	foo(0) +	foo(1) +	foo(2) +	foo([1, 2]) +	foo(3) +	foo(4) +	foo([4,4]) +	foo({1 : 2, 2 : 3}) +	foo({1 : 2, 4 : 3}) diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd b/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd index c3b2506156..17d00bce3c 100644 --- a/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd +++ b/modules/gdscript/tests/scripts/parser/features/lambda_callable.gd @@ -1,4 +1,4 @@  func test(): -    var my_lambda = func(x): -        print(x) -    my_lambda.call("hello") +	var my_lambda = func(x): +		print(x) +	my_lambda.call("hello") diff --git a/modules/gdscript/tests/scripts/parser/features/match_dictionary.gd b/modules/gdscript/tests/scripts/parser/features/match_dictionary.gd index 377dd25e9e..75857fb8ff 100644 --- a/modules/gdscript/tests/scripts/parser/features/match_dictionary.gd +++ b/modules/gdscript/tests/scripts/parser/features/match_dictionary.gd @@ -1,43 +1,43 @@  func foo(x): -    match x: -        {"key1": "value1", "key2": "value2"}: -            print('{"key1": "value1", "key2": "value2"}') -        {"key1": "value1", "key2"}: -            print('{"key1": "value1", "key2"}') -        {"key1", "key2": "value2"}: -            print('{"key1", "key2": "value2"}') -        {"key1", "key2"}: -            print('{"key1", "key2"}') -        {"key1": "value1"}: -            print('{"key1": "value1"}') -        {"key1"}: -            print('{"key1"}') -        _: -            print("wildcard") +	match x: +		{"key1": "value1", "key2": "value2"}: +			print('{"key1": "value1", "key2": "value2"}') +		{"key1": "value1", "key2"}: +			print('{"key1": "value1", "key2"}') +		{"key1", "key2": "value2"}: +			print('{"key1", "key2": "value2"}') +		{"key1", "key2"}: +			print('{"key1", "key2"}') +		{"key1": "value1"}: +			print('{"key1": "value1"}') +		{"key1"}: +			print('{"key1"}') +		_: +			print("wildcard")  func bar(x): -    match x: -        {0}: -            print("0") -        {1}: -            print("1") -        {2}: -            print("2") -        _: -            print("wildcard") +	match x: +		{0}: +			print("0") +		{1}: +			print("1") +		{2}: +			print("2") +		_: +			print("wildcard")  func test(): -    foo({"key1": "value1", "key2": "value2"}) -    foo({"key1": "value1", "key2": ""}) -    foo({"key1": "", "key2": "value2"}) -    foo({"key1": "", "key2": ""}) -    foo({"key1": "value1"}) -    foo({"key1": ""}) -    foo({"key1": "value1", "key2": "value2", "key3": "value3"}) -    foo({"key1": "value1", "key3": ""}) -    foo({"key2": "value2"}) -    foo({"key3": ""}) -    bar({0: "0"}) -    bar({1: "1"}) -    bar({2: "2"}) -    bar({3: "3"}) +	foo({"key1": "value1", "key2": "value2"}) +	foo({"key1": "value1", "key2": ""}) +	foo({"key1": "", "key2": "value2"}) +	foo({"key1": "", "key2": ""}) +	foo({"key1": "value1"}) +	foo({"key1": ""}) +	foo({"key1": "value1", "key2": "value2", "key3": "value3"}) +	foo({"key1": "value1", "key3": ""}) +	foo({"key2": "value2"}) +	foo({"key3": ""}) +	bar({0: "0"}) +	bar({1: "1"}) +	bar({2: "2"}) +	bar({3: "3"}) diff --git a/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd b/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd index dbe223f5f5..a278ea1154 100644 --- a/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd +++ b/modules/gdscript/tests/scripts/parser/features/match_multiple_patterns_with_array.gd @@ -1,26 +1,26 @@  func foo(x): -    match x: -        1, [2]: -            print('1, [2]') -        _: -            print('wildcard') +	match x: +		1, [2]: +			print('1, [2]') +		_: +			print('wildcard')  func bar(x): -    match x: -        [1], [2], [3]: -            print('[1], [2], [3]') -        [4]: -            print('[4]') -        _: -            print('wildcard') +	match x: +		[1], [2], [3]: +			print('[1], [2], [3]') +		[4]: +			print('[4]') +		_: +			print('wildcard')  func test(): -    foo(1) -    foo([2]) -    foo(2) -    bar([1]) -    bar([2]) -    bar([3]) -    bar([4]) -    bar([5]) +	foo(1) +	foo([2]) +	foo(2) +	bar([1]) +	bar([2]) +	bar([3]) +	bar([4]) +	bar([5]) 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 index a0ae7fb17c..0a71f33c25 100644 --- 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 @@ -1,6 +1,6 @@  func test(): -    match [1, 2, 3]: -        [var a, var b, var c]: -            print(a == 1) -            print(b == 2) -            print(c == 3) +	match [1, 2, 3]: +		[var a, var b, var c]: +			print(a == 1) +			print(b == 2) +			print(c == 3) |