summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/README.md2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.gd23
-rw-r--r--modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out19
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.cfg11
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.cfg9
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.gd3
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.cfg11
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.cfg9
-rw-r--r--modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.gd3
-rw-r--r--modules/gdscript/tests/scripts/completion/common/identifiers.cfg21
-rw-r--r--modules/gdscript/tests/scripts/completion/common/identifiers.gd16
-rw-r--r--modules/gdscript/tests/scripts/completion/common/self.cfg21
-rw-r--r--modules/gdscript/tests/scripts/completion/common/self.gd16
-rw-r--r--modules/gdscript/tests/scripts/completion/filter/organized_export.cfg6
-rw-r--r--modules/gdscript/tests/scripts/completion/filter/organized_export.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/filter/usage_internal.cfg4
-rw-r--r--modules/gdscript/tests/scripts/completion/filter/usage_internal.gd3
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/interfered.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/interfered.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/no_type.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/no_type.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_broad.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.gd8
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/interfered.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/interfered.gd9
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/no_type.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/no_type.gd9
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint.gd9
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg13
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_broad.gd9
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg12
-rw-r--r--modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.gd9
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.gd6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable.out6
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable_global.notest.gd2
-rw-r--r--modules/gdscript/tests/scripts/parser/features/export_variable_unnamed.notest.gd1
-rw-r--r--modules/gdscript/tests/scripts/parser/features/lambda_ends_with_new_line.gd1
-rw-r--r--modules/gdscript/tests/scripts/project.godot7
-rw-r--r--modules/gdscript/tests/test_completion.h2
47 files changed, 428 insertions, 6 deletions
diff --git a/modules/gdscript/tests/README.md b/modules/gdscript/tests/README.md
index 714e38397f..4dc706f8d1 100644
--- a/modules/gdscript/tests/README.md
+++ b/modules/gdscript/tests/README.md
@@ -25,6 +25,8 @@ The config file contains two section:
- `cs: boolean = false`: If `true`, the test will be skipped when running a non C# build.
- `use_single_quotes: boolean = false`: Configures the corresponding editor setting for the test.
+- `add_node_path_literals: boolean = false`: Configures the corresponding editor setting for the test.
+- `add_string_name_literals: boolean = false`: Configures the corresponding editor setting for the test.
- `scene: String`: Allows to specify a scene which is opened while autocompletion is performed. If this is not set the test runner will search for a `.tscn` file with the same basename as the GDScript file. If that isn't found either, autocompletion will behave as if no scene was opened.
- `node_path: String`: The node path of the node which holds the current script inside of the scene. Defaults to the scene root node.
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.gd b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.gd
new file mode 100644
index 0000000000..9e1041db54
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.gd
@@ -0,0 +1,23 @@
+var member := 1
+
+func test():
+ var number := 1
+ var string := "1"
+ var vector := Vector2i(1, 0)
+ var array_assign := [1]
+ var array_index := [1]
+ var dictionary := { x = 0 }
+
+ var lambda := func ():
+ member = 2 # Member variable, not captured.
+ number = 2 # Local variable, captured.
+ string += "2" # Test compound assignment operator.
+ vector.x = 2 # Test subscript assignment.
+ array_assign = [2] # Pass-by-reference type, reassignment.
+ array_index[0] = 2 # Pass-by-reference type, index access.
+ dictionary.x = 2 # Pass-by-reference type, attribute access.
+
+ prints("lambda", member, number, string, vector, array_assign, array_index, dictionary)
+
+ lambda.call()
+ prints("outer", member, number, string, vector, array_assign, array_index, dictionary)
diff --git a/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out
new file mode 100644
index 0000000000..8d953818eb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/warnings/confusable_capture_reassignment.out
@@ -0,0 +1,19 @@
+GDTEST_OK
+>> WARNING
+>> Line: 13
+>> CONFUSABLE_CAPTURE_REASSIGNMENT
+>> Reassigning lambda capture does not modify the outer local variable "number".
+>> WARNING
+>> Line: 14
+>> CONFUSABLE_CAPTURE_REASSIGNMENT
+>> Reassigning lambda capture does not modify the outer local variable "string".
+>> WARNING
+>> Line: 15
+>> CONFUSABLE_CAPTURE_REASSIGNMENT
+>> Reassigning lambda capture does not modify the outer local variable "vector".
+>> WARNING
+>> Line: 16
+>> CONFUSABLE_CAPTURE_REASSIGNMENT
+>> Reassigning lambda capture does not modify the outer local variable "array_assign".
+lambda 2 2 12 (2, 0) [2] [2] { "x": 2 }
+outer 2 1 1 (1, 0) [1] [2] { "x": 2 }
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.cfg b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.cfg
new file mode 100644
index 0000000000..a8f26d83f9
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.cfg
@@ -0,0 +1,11 @@
+[input]
+add_node_path_literals=true
+[output]
+include=[
+ {"insert_text": "^\"property_of_a\""},
+ {"insert_text": "^\"name\""},
+]
+exclude=[
+ {"insert_text": "\"property_of_a\""},
+ {"insert_text": "\"name\""},
+]
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.gd b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.gd
new file mode 100644
index 0000000000..bfdb5c7995
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_node_path_tween.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A = preload("res://completion/class_a.notest.gd")
+
+func _ready() -> void:
+ var a := A.new()
+ var tween := get_tree().create_tween()
+ tween.tween_property(a, ➡)
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.cfg b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.cfg
new file mode 100644
index 0000000000..309fa8ed38
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.cfg
@@ -0,0 +1,9 @@
+[input]
+add_string_name_literals=true
+[output]
+include=[
+ {"insert_text": "&\"test_input_action\""},
+]
+exclude=[
+ {"insert_text": "\"test_input_action\""},
+]
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.gd b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.gd
new file mode 100644
index 0000000000..9b325e632d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/add_string_name_input_event.gd
@@ -0,0 +1,3 @@
+func _input(event: InputEvent) -> void:
+ event.is_action_pressed(➡)
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.cfg b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.cfg
new file mode 100644
index 0000000000..45d0ad0f3b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.cfg
@@ -0,0 +1,11 @@
+[input]
+add_node_path_literals=false
+[output]
+include=[
+ {"insert_text": "\"property_of_a\""},
+ {"insert_text": "\"name\""},
+]
+exclude=[
+ {"insert_text": "^\"property_of_a\""},
+ {"insert_text": "^\"name\""},
+]
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.gd b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.gd
new file mode 100644
index 0000000000..bfdb5c7995
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_node_path_tween.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A = preload("res://completion/class_a.notest.gd")
+
+func _ready() -> void:
+ var a := A.new()
+ var tween := get_tree().create_tween()
+ tween.tween_property(a, ➡)
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.cfg b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.cfg
new file mode 100644
index 0000000000..7a388d54e1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.cfg
@@ -0,0 +1,9 @@
+[input]
+add_string_name_literals=false
+[output]
+include=[
+ {"insert_text": "\"test_input_action\""},
+]
+exclude=[
+ {"insert_text": "&\"test_input_action\""},
+]
diff --git a/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.gd b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.gd
new file mode 100644
index 0000000000..9b325e632d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/argument_options/string_literals/dont_add_string_name_input_event.gd
@@ -0,0 +1,3 @@
+func _input(event: InputEvent) -> void:
+ event.is_action_pressed(➡)
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/common/identifiers.cfg b/modules/gdscript/tests/scripts/completion/common/identifiers.cfg
new file mode 100644
index 0000000000..871a404e3a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/common/identifiers.cfg
@@ -0,0 +1,21 @@
+scene="res://completion/get_node/get_node.tscn"
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+
+ ; GDScript: self.gd
+ {"display": "test_signal_1"},
+ {"display": "test_signal_2"},
+ {"display": "test_var_1"},
+ {"display": "test_var_2"},
+ {"display": "test_func_1"},
+ {"display": "test_func_2"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/common/identifiers.gd b/modules/gdscript/tests/scripts/completion/common/identifiers.gd
new file mode 100644
index 0000000000..efbafbee8e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/common/identifiers.gd
@@ -0,0 +1,16 @@
+extends "res://completion/class_a.notest.gd"
+
+signal test_signal_1(a)
+signal test_signal_2(a: int)
+
+var test_var_1
+var test_var_2: int
+
+func test_func_1(t):
+ pass
+
+func test_func_2(t: int) -> void:
+ pass
+
+func _init():
+ t➡
diff --git a/modules/gdscript/tests/scripts/completion/common/self.cfg b/modules/gdscript/tests/scripts/completion/common/self.cfg
new file mode 100644
index 0000000000..871a404e3a
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/common/self.cfg
@@ -0,0 +1,21 @@
+scene="res://completion/get_node/get_node.tscn"
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+
+ ; GDScript: self.gd
+ {"display": "test_signal_1"},
+ {"display": "test_signal_2"},
+ {"display": "test_var_1"},
+ {"display": "test_var_2"},
+ {"display": "test_func_1"},
+ {"display": "test_func_2"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/common/self.gd b/modules/gdscript/tests/scripts/completion/common/self.gd
new file mode 100644
index 0000000000..9ad2fbea51
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/common/self.gd
@@ -0,0 +1,16 @@
+extends "res://completion/class_a.notest.gd"
+
+signal test_signal_1(a)
+signal test_signal_2(a: int)
+
+var test_var_1
+var test_var_2: int
+
+func test_func_1(t):
+ pass
+
+func test_func_2(t: int) -> void:
+ pass
+
+func _init():
+ self.➡
diff --git a/modules/gdscript/tests/scripts/completion/filter/organized_export.cfg b/modules/gdscript/tests/scripts/completion/filter/organized_export.cfg
new file mode 100644
index 0000000000..961a9ea58d
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/filter/organized_export.cfg
@@ -0,0 +1,6 @@
+[output]
+exclude=[
+ {"display": "Test Category"},
+ {"display": "Test Group"},
+ {"display": "Test Subgroup"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/filter/organized_export.gd b/modules/gdscript/tests/scripts/completion/filter/organized_export.gd
new file mode 100644
index 0000000000..189608904c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/filter/organized_export.gd
@@ -0,0 +1,8 @@
+extends CPUParticles2D
+
+@export_category("Test Category")
+@export_group("Test Group")
+@export_subgroup("Test Subgroup")
+
+func _init():
+ ➡
diff --git a/modules/gdscript/tests/scripts/completion/filter/usage_internal.cfg b/modules/gdscript/tests/scripts/completion/filter/usage_internal.cfg
new file mode 100644
index 0000000000..8c5bff5eac
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/filter/usage_internal.cfg
@@ -0,0 +1,4 @@
+[output]
+exclude=[
+ {"display": "messages"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/filter/usage_internal.gd b/modules/gdscript/tests/scripts/completion/filter/usage_internal.gd
new file mode 100644
index 0000000000..484c1c0d10
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/filter/usage_internal.gd
@@ -0,0 +1,3 @@
+func test():
+ var trans = Translation.new()
+ trans.➡
diff --git a/modules/gdscript/tests/scripts/completion/types/local/interfered.cfg b/modules/gdscript/tests/scripts/completion/types/local/interfered.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/interfered.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/interfered.gd b/modules/gdscript/tests/scripts/completion/types/local/interfered.gd
new file mode 100644
index 0000000000..f003c366a4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/interfered.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+func a():
+ var test := A.new()
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg b/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/no_type.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/no_type.gd b/modules/gdscript/tests/scripts/completion/types/local/no_type.gd
new file mode 100644
index 0000000000..f6b5ae3aef
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/no_type.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+func a():
+ var test = A.new()
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint.gd b/modules/gdscript/tests/scripts/completion/types/local/typehint.gd
new file mode 100644
index 0000000000..24bcfc04fc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+func a():
+ var test: A
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.gd b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.gd
new file mode 100644
index 0000000000..88b4812c30
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_broad.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+func a():
+ var test: Node = A.new()
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.gd b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.gd
new file mode 100644
index 0000000000..8e226546f3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/local/typehint_incompatible.gd
@@ -0,0 +1,8 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+func a():
+ var test: A = Node.new()
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/member/interfered.cfg b/modules/gdscript/tests/scripts/completion/types/member/interfered.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/interfered.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/interfered.gd b/modules/gdscript/tests/scripts/completion/types/member/interfered.gd
new file mode 100644
index 0000000000..069abd7891
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/interfered.gd
@@ -0,0 +1,9 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+var test := A.new()
+
+func a():
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg b/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/no_type.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/no_type.gd b/modules/gdscript/tests/scripts/completion/types/member/no_type.gd
new file mode 100644
index 0000000000..9bb9549e97
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/no_type.gd
@@ -0,0 +1,9 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+var test = A.new()
+
+func a():
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint.gd b/modules/gdscript/tests/scripts/completion/types/member/typehint.gd
new file mode 100644
index 0000000000..7763a2e898
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint.gd
@@ -0,0 +1,9 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+var test: A
+
+func a():
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg
new file mode 100644
index 0000000000..81401316ec
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.cfg
@@ -0,0 +1,13 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+]
+exclude=[
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.gd b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.gd
new file mode 100644
index 0000000000..a8506705a1
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_broad.gd
@@ -0,0 +1,9 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+var test: Node = A.new()
+
+func a():
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg
new file mode 100644
index 0000000000..8b68d51a89
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.cfg
@@ -0,0 +1,12 @@
+[output]
+include=[
+ ; Node
+ {"display": "add_child"},
+ {"display": "owner"},
+ {"display": "child_entered_tree"},
+
+ ; GDScript: class_a.notest.gd
+ {"display": "property_of_a"},
+ {"display": "func_of_a"},
+ {"display": "signal_of_a"},
+]
diff --git a/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.gd b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.gd
new file mode 100644
index 0000000000..8b5a80cfb3
--- /dev/null
+++ b/modules/gdscript/tests/scripts/completion/types/member/typehint_incompatible.gd
@@ -0,0 +1,9 @@
+extends Node
+
+const A := preload("res://completion/class_a.notest.gd")
+
+var test: A = Node.new()
+
+func a():
+ test.➡
+ pass
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
index 483e6cab0d..8bcb2bcb9a 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_variable.gd
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.gd
@@ -2,7 +2,8 @@ class_name ExportVariableTest
extends Node
const Utils = preload("../../utils.notest.gd")
-const PreloadedScript = preload("./export_variable.notest.gd")
+const PreloadedGlobalClass = preload("./export_variable_global.notest.gd")
+const PreloadedUnnamedClass = preload("./export_variable_unnamed.notest.gd")
# Built-in types.
@export var test_weak_int = 1
@@ -24,7 +25,8 @@ const PreloadedScript = preload("./export_variable.notest.gd")
# Global custom classes.
@export var test_global_class: ExportVariableTest
-@export var test_preloaded_script: PreloadedScript
+@export var test_preloaded_global_class: PreloadedGlobalClass
+@export var test_preloaded_unnamed_class: PreloadedUnnamedClass # GH-93168
# Arrays.
@export var test_array: Array
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd b/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd
deleted file mode 100644
index 6d064351c1..0000000000
--- a/modules/gdscript/tests/scripts/parser/features/export_variable.notest.gd
+++ /dev/null
@@ -1,2 +0,0 @@
-class_name ExportPreloadedClassTest
-extends Node
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable.out b/modules/gdscript/tests/scripts/parser/features/export_variable.out
index bb094e14b4..d10462bb8d 100644
--- a/modules/gdscript/tests/scripts/parser/features/export_variable.out
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable.out
@@ -25,8 +25,10 @@ var test_timer: Timer = null
hint=NODE_TYPE hint_string="Timer" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"Timer"
var test_global_class: ExportVariableTest = null
hint=NODE_TYPE hint_string="ExportVariableTest" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"ExportVariableTest"
-var test_preloaded_script: ExportPreloadedClassTest = null
- hint=NODE_TYPE hint_string="ExportPreloadedClassTest" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"ExportPreloadedClassTest"
+var test_preloaded_global_class: ExportVariableTestGlobalClass = null
+ hint=NODE_TYPE hint_string="ExportVariableTestGlobalClass" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"ExportVariableTestGlobalClass"
+var test_preloaded_unnamed_class: Node2D = null
+ hint=NODE_TYPE hint_string="Node2D" usage=DEFAULT|SCRIPT_VARIABLE class_name=&"Node2D"
var test_array: Array = []
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
var test_array_bool: Array = Array[bool]([])
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable_global.notest.gd b/modules/gdscript/tests/scripts/parser/features/export_variable_global.notest.gd
new file mode 100644
index 0000000000..caa2ead214
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable_global.notest.gd
@@ -0,0 +1,2 @@
+class_name ExportVariableTestGlobalClass
+extends Node2D
diff --git a/modules/gdscript/tests/scripts/parser/features/export_variable_unnamed.notest.gd b/modules/gdscript/tests/scripts/parser/features/export_variable_unnamed.notest.gd
new file mode 100644
index 0000000000..e251cf8aee
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/export_variable_unnamed.notest.gd
@@ -0,0 +1 @@
+extends Node2D
diff --git a/modules/gdscript/tests/scripts/parser/features/lambda_ends_with_new_line.gd b/modules/gdscript/tests/scripts/parser/features/lambda_ends_with_new_line.gd
index 46b6856d22..c3a42288c7 100644
--- a/modules/gdscript/tests/scripts/parser/features/lambda_ends_with_new_line.gd
+++ b/modules/gdscript/tests/scripts/parser/features/lambda_ends_with_new_line.gd
@@ -9,6 +9,7 @@ func four_parameters(_a, callable : Callable, b=func(): print(10)):
func test():
var v
+ @warning_ignore("confusable_capture_reassignment")
v=func():v=1
if true: v=1
print(v)
diff --git a/modules/gdscript/tests/scripts/project.godot b/modules/gdscript/tests/scripts/project.godot
index c500ef443d..c9035ecab9 100644
--- a/modules/gdscript/tests/scripts/project.godot
+++ b/modules/gdscript/tests/scripts/project.godot
@@ -8,3 +8,10 @@ config_version=5
[application]
config/name="GDScript Integration Test Suite"
+
+[input]
+
+test_input_action={
+"deadzone": 0.5,
+"events": []
+}
diff --git a/modules/gdscript/tests/test_completion.h b/modules/gdscript/tests/test_completion.h
index 327446acee..387358934d 100644
--- a/modules/gdscript/tests/test_completion.h
+++ b/modules/gdscript/tests/test_completion.h
@@ -130,6 +130,8 @@ static void test_directory(const String &p_dir) {
#endif
EditorSettings::get_singleton()->set_setting("text_editor/completion/use_single_quotes", conf.get_value("input", "use_single_quotes", false));
+ EditorSettings::get_singleton()->set_setting("text_editor/completion/add_node_path_literals", conf.get_value("input", "add_node_path_literals", false));
+ EditorSettings::get_singleton()->set_setting("text_editor/completion/add_string_name_literals", conf.get_value("input", "add_string_name_literals", false));
List<Dictionary> include;
to_dict_list(conf.get_value("output", "include", Array()), include);