| 22 | { |
| 23 | |
| 24 | bool 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 | |
| 38 | bool RunString(lua_State* L, const char* script) |