diff options
author | HolonProduction <holonproduction@gmail.com> | 2024-07-13 22:20:20 +0200 |
---|---|---|
committer | HolonProduction <holonproduction@gmail.com> | 2024-07-15 10:04:11 +0200 |
commit | 06e732c3ed85bdbe67702b3778b53c21f8d24c81 (patch) | |
tree | 26e5ee6b25080b712fbf91f1861d09cccd656486 /modules/gdscript/tests/scripts | |
parent | 97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b (diff) | |
download | redot-engine-06e732c3ed85bdbe67702b3778b53c21f8d24c81.tar.gz |
GDScript: Restore support for `Token::UNDERSCORE` in identifiers
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.gd | 15 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.out | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.gd b/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.gd new file mode 100644 index 0000000000..b07c40b6da --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.gd @@ -0,0 +1,15 @@ +extends Node + +func test() -> void: + var node1 := Node.new() + node1.name = "_" + var node2 := Node.new() + node2.name = "Child" + var node3 := Node.new() + node3.name = "Child" + + add_child(node1) + node1.add_child(node2) + add_child(node3) + + assert(get_node("_/Child") == $_/Child) diff --git a/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.out b/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.out new file mode 100644 index 0000000000..d73c5eb7cd --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/single_underscore_node_name.out @@ -0,0 +1 @@ +GDTEST_OK |