Added script include test

This commit is contained in:
ksuprynowicz 2023-01-22 19:45:15 +01:00
parent a7b1fdcae6
commit c8898e8366
3 changed files with 18 additions and 1 deletions

View file

@ -88,7 +88,7 @@ void ScriptEngineTests::scriptTest() {
ac->loadOneScript(script);
}*/
//ac->loadOneScript("tests/003_vector_math.js");
ac->loadOneScript("tests/004_require.js");
ac->loadOneScript("tests/005_include.js");
qDebug() << ac->getRunning();

View file

@ -0,0 +1,9 @@
"use strict";
Script.include("./005b_included.js");
function functionInMainFile () {
print("In main file");
}
functionInInclude();

View file

@ -0,0 +1,8 @@
"use strict";
function functionInInclude() {
print("Function in include");
functionInMainFile();
}
functionInMainFile();