mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #52718 from Calinou/gdscript-add-integration-tests-2
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
func test() {
|
||||
print("Hello world!");
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expected ":" after function declaration.
|
||||
@@ -0,0 +1,2 @@
|
||||
func test():
|
||||
var escape = "invalid escape \h <- here"
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Invalid escape in string.
|
||||
@@ -0,0 +1,5 @@
|
||||
func test():
|
||||
var amount = 50
|
||||
# C-style ternary operator is invalid in GDScript.
|
||||
# The valid syntax is `"yes" if amount < 60 else "no"`, like in Python.
|
||||
var ternary = amount < 60 ? "yes" : "no"
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Unexpected "?" in source. If you want a ternary operator, use "truthy_value if true_condition else falsy_value".
|
||||
@@ -0,0 +1,13 @@
|
||||
# The VCS conflict marker has only 6 `=` signs instead of 7 to prevent editors like
|
||||
# Visual Studio Code from recognizing it as an actual VCS conflict marker.
|
||||
# Nonetheless, the GDScript parser is still expected to find and report the VCS
|
||||
# conflict marker error correctly.
|
||||
|
||||
<<<<<<< HEAD
|
||||
Hello world
|
||||
======
|
||||
Goodbye
|
||||
>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086
|
||||
|
||||
func test():
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Unexpected "VCS conflict marker" in class body.
|
||||
Reference in New Issue
Block a user