summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/parser/features/string_formatting.gd2
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd11
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out2
3 files changed, 14 insertions, 1 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/string_formatting.gd b/modules/gdscript/tests/scripts/parser/features/string_formatting.gd
index a91837145d..0815915f04 100644
--- a/modules/gdscript/tests/scripts/parser/features/string_formatting.gd
+++ b/modules/gdscript/tests/scripts/parser/features/string_formatting.gd
@@ -13,6 +13,6 @@ func test():
print("hello %.02f" % 0.123456 == "hello 0.12")
# Dynamic padding:
- # <https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_format_string.html#dynamic-padding>
+ # https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html#dynamic-padding
print("hello %*.*f" % [7, 3, 0.123456] == "hello 0.123")
print("hello %0*.*f" % [7, 3, 0.123456] == "hello 000.123")
diff --git a/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd
new file mode 100644
index 0000000000..a778fb1a94
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd
@@ -0,0 +1,11 @@
+class Foo extends Node:
+ func _init():
+ name = 'f'
+ var string: String = name
+ assert(typeof(string) == TYPE_STRING)
+ assert(string == 'f')
+ print('ok')
+
+func test():
+ var foo := Foo.new()
+ foo.free()
diff --git a/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out
new file mode 100644
index 0000000000..1b47ed10dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+ok