mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add unit tests for SAO load / unload behaviour
This commit is contained in:
parent
8339594206
commit
e3b9828f24
8 changed files with 332 additions and 7 deletions
|
@ -22,11 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "mock_inventorymanager.h"
|
||||
#include "mock_server.h"
|
||||
#include "mock_serveractiveobject.h"
|
||||
|
||||
#include "scripting_server.h"
|
||||
#include "server/mods.h"
|
||||
|
||||
|
||||
class TestMoveAction : public TestBase
|
||||
{
|
||||
public:
|
||||
|
@ -63,7 +61,7 @@ void TestMoveAction::runTests(IGameDef *gamedef)
|
|||
server.m_modmgr = std::make_unique<ServerModManager>(server.m_path_world);
|
||||
|
||||
std::string builtin = Server::getBuiltinLuaPath() + DIR_DELIM;
|
||||
server_scripting.loadMod(builtin + "init.lua", BUILTIN_MOD_NAME);
|
||||
server_scripting.loadBuiltin();
|
||||
server_scripting.loadMod(builtin + "game" DIR_DELIM "tests" DIR_DELIM "test_moveaction.lua", BUILTIN_MOD_NAME);
|
||||
} catch (ModError &e) {
|
||||
// Print backtrace in case of syntax errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue