MCPcopy Create free account
hub / github.com/defold/defold / RunFile

Function RunFile

engine/script/src/test/test_script.cpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22{
23
24bool RunFile(lua_State* L, const char* filename, const char* base_dir)
25{
26 char path[1024];
27 dmTestUtil::MakeHostPathf(path, sizeof(path), "%s/%s", base_dir, filename);
28
29 if (luaL_dofile(L, path) != 0)
30 {
31 dmLogError("%s", lua_tolstring(L, -1, 0));
32 return false;
33 }
34 return true;
35}
36
37
38bool RunString(lua_State* L, const char* script)

Callers 13

TEST_FFunction · 0.70
RunFileMethod · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70
TEST_FFunction · 0.70

Calls 2

MakeHostPathfFunction · 0.85
lua_tolstringFunction · 0.85

Tested by

no test coverage detected