chore: add GUT test framework
This commit is contained in:
21
addons/gut/scratch/demo_reload_error.gd
Normal file
21
addons/gut/scratch/demo_reload_error.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
# Demo for https://github.com/godotengine/godot/issues/65263
|
||||
extends SceneTree
|
||||
|
||||
func _init():
|
||||
var script_source = '' + \
|
||||
"func hello_world():\n" + \
|
||||
"\tprint('--- hello world ---')"
|
||||
|
||||
print(script_source)
|
||||
|
||||
var DynScript = GDScript.new()
|
||||
DynScript.source_code = script_source
|
||||
DynScript.resource_path = 'workaround for godot issue #65263'
|
||||
print('pre-reload')
|
||||
DynScript.reload()
|
||||
print('post-reload')
|
||||
|
||||
var inst = DynScript.new()
|
||||
inst.hello_world()
|
||||
|
||||
quit()
|
||||
Reference in New Issue
Block a user