1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Rename GDScript test script filenames to use snake_case

This commit is contained in:
Andrii Doroshenko (Xrayez)
2021-04-16 22:16:19 +03:00
parent 49511d4391
commit 1e26bf23c2
24 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
func args(a, b):
print(a)
print(b)
func test():
args(1,)

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Too few arguments for "args()" call. Expected at least 2 but received 1.

View File

@@ -0,0 +1,2 @@
func test():
var a = ("missing paren ->"

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expected closing ")" after grouping expression.

View File

@@ -0,0 +1,3 @@
func test():
if true # Missing colon here.
print("true")

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expected ":" after "if" condition.

View File

@@ -0,0 +1,6 @@
func args(a, b):
print(a)
print(b)
func test():
args(1,2

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expected closing ")" after call arguments.

View File

@@ -0,0 +1,3 @@
func test():
print("Using spaces")
print("Using tabs")

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Used "\t" for indentation instead " " as used before in the file.

View File

@@ -0,0 +1,3 @@
extends Node
func test():
var a = $ # Expected some node path.

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expect node path as string or identifier after "$".

View File

@@ -0,0 +1,3 @@
extends Node
func test():
$23 # Can't use number here.

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expect node path as string or identifier after "$".

View File

@@ -0,0 +1,3 @@
extends Node
func test():
$MyNode/23 # Can't use number here.

View File

@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Expect node path after "/".

View File

@@ -0,0 +1,2 @@
func test():
print("A"); print("B")

View File

@@ -0,0 +1,3 @@
GDTEST_OK
A
B

View File

@@ -0,0 +1,7 @@
# See https://github.com/godotengine/godot/issues/41066.
func f(p, ): ## <-- no errors
print(p)
func test():
f(0, ) ## <-- no error

View File

@@ -0,0 +1,2 @@
GDTEST_OK
0

View File

@@ -0,0 +1,12 @@
var a # No init.
var b = 42 # Init.
func test():
var c # No init, local.
var d = 23 # Init, local.
a = 1
c = 2
prints(a, b, c, d)
print("OK")

View File

@@ -0,0 +1,7 @@
GDTEST_OK
>> WARNING
>> Line: 5
>> UNASSIGNED_VARIABLE
>> The variable 'c' was used but never assigned a value.
1 42 2 23
OK

View File

@@ -0,0 +1,2 @@
func test():
var unused = "not used"

View File

@@ -0,0 +1,5 @@
GDTEST_OK
>> WARNING
>> Line: 2
>> UNUSED_VARIABLE
>> The local variable 'unused' is declared but never used in the block. If this is intended, prefix it with an underscore: '_unused'