Added loadScriptBytecode()

This commit is contained in:
2023-01-21 04:27:01 +00:00
parent d57fca474f
commit df85d30553
3 changed files with 120 additions and 1 deletions

View File

@@ -1,12 +1,19 @@
import runner;
//test basic loading and freeing of code
//test basic loading and freeing of a script file
{
var s = loadScript("scripts:/runner_sample_code.toy");
s.freeScript();
}
//test basic loading and freeing of a binary file
{
var s = loadScriptBytecode("scripts:/lib/runner/sample_bytecode.tb");
s.freeScript();
}
//test running an external script
{
var s = loadScript("scripts:/runner_sample_code.toy");