mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Update to latest version of testing plugins
It includes an ESL plugin with the light master flag set for Skyrim SE and Fallout 4.
This commit is contained in:
+1
-1
@@ -132,7 +132,7 @@ ExternalProject_Add(testing-metadata
|
||||
|
||||
ExternalProject_Add(testing-plugins
|
||||
PREFIX "external"
|
||||
URL "https://github.com/WrinklyNinja/testing-plugins/archive/1.0.0.tar.gz"
|
||||
URL "https://github.com/WrinklyNinja/testing-plugins/archive/1.4.1.tar.gz"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
@@ -140,24 +140,34 @@ TEST_P(GameInterfaceTest, sortPluginsShouldSucceedIfPassedValidArguments) {
|
||||
blankDifferentPluginDependentEsp,
|
||||
};
|
||||
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se) {
|
||||
expectedOrder.insert(expectedOrder.begin() + 5, blankEsl);
|
||||
}
|
||||
|
||||
ASSERT_NO_THROW(GenerateMasterlist());
|
||||
ASSERT_NO_THROW(
|
||||
handle_->GetDatabase()->LoadLists(masterlistPath.string(), ""));
|
||||
|
||||
std::vector<std::string> actualOrder = handle_->SortPlugins({
|
||||
blankEsp,
|
||||
blankPluginDependentEsp,
|
||||
blankDifferentMasterDependentEsm,
|
||||
blankMasterDependentEsp,
|
||||
blankDifferentMasterDependentEsp,
|
||||
blankDifferentEsp,
|
||||
blankDifferentPluginDependentEsp,
|
||||
masterFile,
|
||||
blankEsm,
|
||||
blankMasterDependentEsm,
|
||||
blankDifferentEsm,
|
||||
std::vector<std::string> pluginsToSort({
|
||||
blankEsp,
|
||||
blankPluginDependentEsp,
|
||||
blankDifferentMasterDependentEsm,
|
||||
blankMasterDependentEsp,
|
||||
blankDifferentMasterDependentEsp,
|
||||
blankDifferentEsp,
|
||||
blankDifferentPluginDependentEsp,
|
||||
masterFile,
|
||||
blankEsm,
|
||||
blankMasterDependentEsm,
|
||||
blankDifferentEsm,
|
||||
});
|
||||
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se) {
|
||||
pluginsToSort.push_back(blankEsl);
|
||||
}
|
||||
|
||||
std::vector<std::string> actualOrder = handle_->SortPlugins(pluginsToSort);
|
||||
|
||||
EXPECT_EQ(expectedOrder, actualOrder);
|
||||
}
|
||||
|
||||
@@ -194,6 +204,10 @@ TEST_P(GameInterfaceTest, setLoadOrderShouldSetTheLoadOrder) {
|
||||
blankPluginDependentEsp,
|
||||
});
|
||||
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se) {
|
||||
loadOrder.insert(loadOrder.begin() + 5, blankEsl);
|
||||
}
|
||||
|
||||
EXPECT_NO_THROW(handle_->SetLoadOrder(loadOrder));
|
||||
|
||||
EXPECT_EQ(loadOrder, handle_->GetLoadOrder());
|
||||
|
||||
@@ -46,7 +46,11 @@ protected:
|
||||
blankMasterDependentEsp,
|
||||
blankDifferentMasterDependentEsp,
|
||||
blankPluginDependentEsp,
|
||||
}) {}
|
||||
}) {
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se) {
|
||||
loadOrderToSet_.insert(loadOrderToSet_.begin() + 5, blankEsl);
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown() { CommonGameTestFixture::TearDown(); }
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ protected:
|
||||
PluginTest() :
|
||||
emptyFile("EmptyFile.esm"),
|
||||
lowercaseBlankEsp("blank.esp"),
|
||||
blankEsl("blank.esl"),
|
||||
game_(GetParam(), dataPath.parent_path(), localPath),
|
||||
blankArchive("Blank" + GetArchiveFileExtension(game_.Type())),
|
||||
blankSuffixArchive("Blank - Different - suffix" +
|
||||
@@ -58,8 +57,10 @@ protected:
|
||||
dataPath / lowercaseBlankEsp));
|
||||
#endif
|
||||
|
||||
ASSERT_NO_THROW(
|
||||
if (GetParam() != GameType::fo4 && GetParam() != GameType::tes5se) {
|
||||
ASSERT_NO_THROW(
|
||||
boost::filesystem::copy(dataPath / blankEsp, dataPath / blankEsl));
|
||||
}
|
||||
|
||||
// Create dummy archive files.
|
||||
out.open(dataPath / blankArchive);
|
||||
@@ -75,16 +76,18 @@ protected:
|
||||
#ifndef _WIN32
|
||||
boost::filesystem::remove(dataPath / lowercaseBlankEsp);
|
||||
#endif
|
||||
boost::filesystem::remove(dataPath / blankEsl);
|
||||
boost::filesystem::remove(dataPath / blankArchive);
|
||||
boost::filesystem::remove(dataPath / blankSuffixArchive);
|
||||
|
||||
if (GetParam() != GameType::fo4 && GetParam() != GameType::tes5se) {
|
||||
boost::filesystem::remove(dataPath / blankEsl);
|
||||
}
|
||||
}
|
||||
|
||||
Game game_;
|
||||
|
||||
const std::string emptyFile;
|
||||
const std::string lowercaseBlankEsp;
|
||||
const std::string blankEsl;
|
||||
const std::string blankArchive;
|
||||
const std::string blankSuffixArchive;
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ protected:
|
||||
blankMasterDependentEsm("Blank - Master Dependent.esm"),
|
||||
blankDifferentMasterDependentEsm(
|
||||
"Blank - Different Master Dependent.esm"),
|
||||
blankEsl("Blank.esl"),
|
||||
blankEsp("Blank.esp"),
|
||||
blankDifferentEsp("Blank - Different.esp"),
|
||||
blankMasterDependentEsp("Blank - Master Dependent.esp"),
|
||||
@@ -190,7 +191,7 @@ protected:
|
||||
}
|
||||
|
||||
inline std::vector<std::pair<std::string, bool>> getInitialLoadOrder() const {
|
||||
return std::vector<std::pair<std::string, bool>>({
|
||||
auto loadOrder = std::vector<std::pair<std::string, bool>>({
|
||||
{masterFile, true},
|
||||
{blankEsm, true},
|
||||
{blankDifferentEsm, false},
|
||||
@@ -203,6 +204,12 @@ protected:
|
||||
{blankPluginDependentEsp, false},
|
||||
{blankDifferentPluginDependentEsp, false},
|
||||
});
|
||||
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se) {
|
||||
loadOrder.insert(loadOrder.begin() + 5, std::make_pair(blankEsl, false));
|
||||
}
|
||||
|
||||
return loadOrder;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -222,6 +229,7 @@ protected:
|
||||
const std::string blankDifferentEsm;
|
||||
const std::string blankMasterDependentEsm;
|
||||
const std::string blankDifferentMasterDependentEsm;
|
||||
const std::string blankEsl;
|
||||
const std::string blankEsp;
|
||||
const std::string blankDifferentEsp;
|
||||
const std::string blankMasterDependentEsp;
|
||||
@@ -235,6 +243,8 @@ private:
|
||||
inline boost::filesystem::path getLocalPath() const {
|
||||
if (GetParam() == GameType::tes4)
|
||||
return "./local/Oblivion";
|
||||
else if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se)
|
||||
return "./local/SkyrimSE";
|
||||
else
|
||||
return "./local/Skyrim";
|
||||
}
|
||||
@@ -242,6 +252,8 @@ private:
|
||||
inline boost::filesystem::path getPluginsPath() const {
|
||||
if (GetParam() == GameType::tes4)
|
||||
return "./Oblivion/Data";
|
||||
else if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se)
|
||||
return "./SkyrimSE/Data";
|
||||
else
|
||||
return "./Skyrim/Data";
|
||||
}
|
||||
@@ -263,7 +275,7 @@ private:
|
||||
if (GetParam() == GameType::tes4)
|
||||
return 0x374E2A6F;
|
||||
else
|
||||
return 0x187BE342;
|
||||
return 0x6A1273DC;
|
||||
}
|
||||
|
||||
void setLoadOrder(
|
||||
|
||||
Reference in New Issue
Block a user