1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Allow game to specify first and last mod in mod loading order (#14177)

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
sfence 2024-06-01 16:36:20 +02:00 committed by GitHub
parent a4768d1638
commit 140b9e5a5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 141 additions and 64 deletions

View file

@ -121,7 +121,8 @@ void TestServerModManager::testGetMods()
{
ServerModManager sm(m_worlddir);
const auto &mods = sm.getMods();
UASSERTEQ(bool, mods.empty(), false);
// `ls ./games/devtest/mods | wc -l` + 1 (test mod)
UASSERTEQ(std::size_t, mods.size(), 31 + 1);
// Ensure we found basenodes mod (part of devtest)
// and test_mod (for testing MINETEST_MOD_PATH).
@ -139,6 +140,9 @@ void TestServerModManager::testGetMods()
UASSERTEQ(bool, default_found, true);
UASSERTEQ(bool, test_mod_found, true);
UASSERT(mods.front().name == "first_mod");
UASSERT(mods.back().name == "last_mod");
}
void TestServerModManager::testGetModspec()