mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Added script include test
This commit is contained in:
parent
a7b1fdcae6
commit
c8898e8366
3 changed files with 18 additions and 1 deletions
|
@ -88,7 +88,7 @@ void ScriptEngineTests::scriptTest() {
|
||||||
ac->loadOneScript(script);
|
ac->loadOneScript(script);
|
||||||
}*/
|
}*/
|
||||||
//ac->loadOneScript("tests/003_vector_math.js");
|
//ac->loadOneScript("tests/003_vector_math.js");
|
||||||
ac->loadOneScript("tests/004_require.js");
|
ac->loadOneScript("tests/005_include.js");
|
||||||
|
|
||||||
qDebug() << ac->getRunning();
|
qDebug() << ac->getRunning();
|
||||||
|
|
||||||
|
|
9
tests/script-engine/src/tests/005_include.js
Normal file
9
tests/script-engine/src/tests/005_include.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Script.include("./005b_included.js");
|
||||||
|
|
||||||
|
function functionInMainFile () {
|
||||||
|
print("In main file");
|
||||||
|
}
|
||||||
|
|
||||||
|
functionInInclude();
|
8
tests/script-engine/src/tests/005b_included.js
Normal file
8
tests/script-engine/src/tests/005b_included.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
function functionInInclude() {
|
||||||
|
print("Function in include");
|
||||||
|
functionInMainFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
functionInMainFile();
|
Loading…
Reference in a new issue