mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Revert util -> utility in cleaning metadata structure
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ set(PSEUDOSEM_INCLUDE_DIRS "${SOURCE_DIR}/include")
|
||||
|
||||
ExternalProject_Add(testing-metadata
|
||||
PREFIX "external"
|
||||
URL "https://github.com/loot/testing-metadata/archive/2.0.0.tar.gz"
|
||||
URL "https://github.com/loot/testing-metadata/archive/1.1.0.tar.gz"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
@@ -24,7 +24,6 @@ Changed
|
||||
* The ``file()`` condition function now also accepts a regular expression.
|
||||
* The ``active()`` condition function to also accept a regular expression.
|
||||
* Renamed the dirty info data structure to the cleaning data structure.
|
||||
* Renamed the ``util`` key in the cleaning data structure to ``utility`` .
|
||||
|
||||
Removed
|
||||
-------
|
||||
|
||||
@@ -9,7 +9,7 @@ This structure holds information on which versions of a plugin are dirty or clea
|
||||
|
||||
**Required.** The CRC-32 checksum of the plugin. If the plugin is dirty, this needs to be the CRC of the plugin before before cleaning. LOOT displays the CRCs of installed plugins in its report. The 8-character CRC should be preceded by ``0x`` so that it is interpreted correctly.
|
||||
|
||||
.. describe:: utility
|
||||
.. describe:: util
|
||||
|
||||
``string``
|
||||
|
||||
@@ -50,7 +50,7 @@ Examples
|
||||
A dirty plugin::
|
||||
|
||||
crc: 0x3DF62ABC
|
||||
utility: '[TES5Edit](http://www.nexusmods.com/skyrim/mods/25859) v3.1.1'
|
||||
util: '[TES5Edit](http://www.nexusmods.com/skyrim/mods/25859) v3.1.1'
|
||||
info: 'A cleaning guide is available [here](http://www.creationkit.com/index.php?title=TES5Edit_Cleaning_Guide_-_TES5Edit).'
|
||||
itm: 4
|
||||
udr: 160
|
||||
@@ -58,4 +58,4 @@ A dirty plugin::
|
||||
A clean plugin::
|
||||
|
||||
crc: 0x2ABC3DF6
|
||||
utility: '[TES5Edit](http://www.nexusmods.com/skyrim/mods/25859) v3.1.1'
|
||||
util: '[TES5Edit](http://www.nexusmods.com/skyrim/mods/25859) v3.1.1'
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace YAML {
|
||||
Emitter& operator << (Emitter& out, const loot::PluginCleaningData& rhs) {
|
||||
out << BeginMap
|
||||
<< Key << "crc" << Value << Hex << rhs.CRC() << Dec
|
||||
<< Key << "utility" << Value << YAML::SingleQuoted << rhs.CleaningUtility();
|
||||
<< Key << "util" << Value << YAML::SingleQuoted << rhs.CleaningUtility();
|
||||
|
||||
if (!rhs.Info().empty()) {
|
||||
if (rhs.Info().size() == 1)
|
||||
|
||||
@@ -76,7 +76,7 @@ struct convert<loot::PluginCleaningData> {
|
||||
static Node encode(const loot::PluginCleaningData& rhs) {
|
||||
Node node;
|
||||
node["crc"] = rhs.CRC();
|
||||
node["utility"] = rhs.CleaningUtility();
|
||||
node["util"] = rhs.CleaningUtility();
|
||||
node["info"] = rhs.Info();
|
||||
|
||||
if (rhs.ITMs() > 0)
|
||||
@@ -94,8 +94,8 @@ struct convert<loot::PluginCleaningData> {
|
||||
throw RepresentationException(node.Mark(), "bad conversion: 'cleaning data' object must be a map");
|
||||
if (!node["crc"])
|
||||
throw RepresentationException(node.Mark(), "bad conversion: 'crc' key missing from 'cleaning data' object");
|
||||
if (!node["utility"])
|
||||
throw RepresentationException(node.Mark(), "bad conversion: 'utility' key missing from 'cleaning data' object");
|
||||
if (!node["util"])
|
||||
throw RepresentationException(node.Mark(), "bad conversion: 'util' key missing from 'cleaning data' object");
|
||||
|
||||
uint32_t crc = node["crc"].as<uint32_t>();
|
||||
int itm = 0, ref = 0, nav = 0;
|
||||
@@ -107,7 +107,7 @@ struct convert<loot::PluginCleaningData> {
|
||||
if (node["nav"])
|
||||
nav = node["nav"].as<unsigned int>();
|
||||
|
||||
std::string utility = node["utility"].as<std::string>();
|
||||
std::string utility = node["util"].as<std::string>();
|
||||
|
||||
std::vector<loot::MessageContent> info;
|
||||
if (node["info"]) {
|
||||
|
||||
@@ -268,7 +268,7 @@ loot-editor-close
|
||||
itm: rowData.itm,
|
||||
udr: rowData.udr,
|
||||
nav: rowData.nav,
|
||||
utility: rowData.utility,
|
||||
util: rowData.utility,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -351,7 +351,7 @@ loot-editor-close
|
||||
itm: dirtyInfo.itm,
|
||||
udr: dirtyInfo.udr,
|
||||
nav: dirtyInfo.nav,
|
||||
utility: dirtyInfo.utility,
|
||||
utility: dirtyInfo.util,
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ protected:
|
||||
<< " content: '" << warningMessage << "'" << endl
|
||||
<< " dirty:" << endl
|
||||
<< " - crc: 0x7d22f9df" << endl
|
||||
<< " utility: TES4Edit" << endl
|
||||
<< " util: TES4Edit" << endl
|
||||
<< " udr: 4" << endl
|
||||
<< " - name: " << blankDifferentEsp << endl
|
||||
<< " after:" << endl
|
||||
|
||||
@@ -36,7 +36,7 @@ protected:
|
||||
DatabaseInterfaceTest() :
|
||||
userlistPath_(localPath / "userlist.yaml"),
|
||||
url_("https://github.com/loot/testing-metadata.git"),
|
||||
branch_("2.x"),
|
||||
branch_("master"),
|
||||
minimalOutputPath_(localPath / "minimal.yml") {}
|
||||
|
||||
void SetUp() {
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
<< " - name: '" << blankDifferentEsm << "'" << endl
|
||||
<< " dirty:" << endl
|
||||
<< " - crc: 0x7d22f9df" << endl
|
||||
<< " utility: 'TES4Edit'" << endl
|
||||
<< " util: 'TES4Edit'" << endl
|
||||
<< " udr: 4";
|
||||
|
||||
return expectedContent.str();
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace test {
|
||||
class MasterlistTest : public CommonGameTestFixture {
|
||||
protected:
|
||||
MasterlistTest() :
|
||||
repoBranch("2.x"),
|
||||
repoBranch("master"),
|
||||
repoUrl("https://github.com/loot/testing-metadata.git"),
|
||||
masterlistPath(localPath / "masterlist.yaml") {}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ TEST_P(PluginCleaningDataTest, emittingAsYamlShouldOutputAllNonZeroCounts) {
|
||||
YAML::Emitter emitter;
|
||||
emitter << info;
|
||||
|
||||
EXPECT_STREQ("crc: 0x12345678\nutility: 'cleaner'\ninfo: 'info'\nitm: 2\nudr: 10\nnav: 30", emitter.c_str());
|
||||
EXPECT_STREQ("crc: 0x12345678\nutil: 'cleaner'\ninfo: 'info'\nitm: 2\nudr: 10\nnav: 30", emitter.c_str());
|
||||
}
|
||||
|
||||
TEST_P(PluginCleaningDataTest, emittingAsYamlShouldOmitAllZeroCounts) {
|
||||
@@ -196,7 +196,7 @@ TEST_P(PluginCleaningDataTest, emittingAsYamlShouldOmitAllZeroCounts) {
|
||||
YAML::Emitter emitter;
|
||||
emitter << info;
|
||||
|
||||
EXPECT_STREQ("crc: 0x12345678\nutility: 'cleaner'\ninfo: 'info'", emitter.c_str());
|
||||
EXPECT_STREQ("crc: 0x12345678\nutil: 'cleaner'\ninfo: 'info'", emitter.c_str());
|
||||
}
|
||||
|
||||
TEST_P(PluginCleaningDataTest, encodingAsYamlShouldOmitAllZeroCountFields) {
|
||||
@@ -205,7 +205,7 @@ TEST_P(PluginCleaningDataTest, encodingAsYamlShouldOmitAllZeroCountFields) {
|
||||
node = info;
|
||||
|
||||
EXPECT_EQ(0x12345678, node["crc"].as<uint32_t>());
|
||||
EXPECT_EQ("cleaner", node["utility"].as<std::string>());
|
||||
EXPECT_EQ("cleaner", node["util"].as<std::string>());
|
||||
EXPECT_EQ(info_, node["info"].as<std::vector<MessageContent>>());
|
||||
EXPECT_FALSE(node["itm"]);
|
||||
EXPECT_FALSE(node["udr"]);
|
||||
@@ -218,7 +218,7 @@ TEST_P(PluginCleaningDataTest, encodingAsYamlShouldOutputAllNonZeroCountFields)
|
||||
node = info;
|
||||
|
||||
EXPECT_EQ(0x12345678, node["crc"].as<uint32_t>());
|
||||
EXPECT_EQ("cleaner", node["utility"].as<std::string>());
|
||||
EXPECT_EQ("cleaner", node["util"].as<std::string>());
|
||||
EXPECT_EQ(info_, node["info"].as<std::vector<MessageContent>>());
|
||||
EXPECT_EQ(2, node["itm"].as<unsigned int>());
|
||||
EXPECT_EQ(10, node["udr"].as<unsigned int>());
|
||||
@@ -226,7 +226,7 @@ TEST_P(PluginCleaningDataTest, encodingAsYamlShouldOutputAllNonZeroCountFields)
|
||||
}
|
||||
|
||||
TEST_P(PluginCleaningDataTest, decodingFromYamlShouldLeaveMissingFieldsWithZeroValues) {
|
||||
YAML::Node node = YAML::Load("{crc: 0x12345678, utility: cleaner}");
|
||||
YAML::Node node = YAML::Load("{crc: 0x12345678, util: cleaner}");
|
||||
PluginCleaningData info = node.as<PluginCleaningData>();
|
||||
|
||||
EXPECT_EQ(0x12345678, info.CRC());
|
||||
@@ -238,7 +238,7 @@ TEST_P(PluginCleaningDataTest, decodingFromYamlShouldLeaveMissingFieldsWithZeroV
|
||||
}
|
||||
|
||||
TEST_P(PluginCleaningDataTest, decodingFromYamlShouldStoreAllNonZeroCounts) {
|
||||
YAML::Node node = YAML::Load("{crc: 0x12345678, utility: cleaner, info: info, itm: 2, udr: 10, nav: 30}");
|
||||
YAML::Node node = YAML::Load("{crc: 0x12345678, util: cleaner, info: info, itm: 2, udr: 10, nav: 30}");
|
||||
PluginCleaningData info = node.as<PluginCleaningData>();
|
||||
|
||||
EXPECT_EQ(0x12345678, info.CRC());
|
||||
|
||||
@@ -948,7 +948,7 @@ TEST_P(PluginMetadataTest, emittingAsYamlShouldOutputAPluginWithDirtyInfoCorrect
|
||||
EXPECT_STREQ("name: 'Blank.esp'\n"
|
||||
"dirty:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'\n"
|
||||
" util: 'utility'\n"
|
||||
" info: 'info'\n"
|
||||
" udr: 1\n"
|
||||
" nav: 2", emitter.c_str());
|
||||
@@ -964,7 +964,7 @@ TEST_P(PluginMetadataTest, emittingAsYamlShouldOutputAPluginWithCleanInfoCorrect
|
||||
EXPECT_STREQ("name: 'Blank.esp'\n"
|
||||
"clean:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'", emitter.c_str());
|
||||
" util: 'utility'", emitter.c_str());
|
||||
}
|
||||
|
||||
TEST_P(PluginMetadataTest, emittingAsYamlShouldOutputAPluginWithLocationsCorrectly) {
|
||||
@@ -1141,12 +1141,12 @@ TEST_P(PluginMetadataTest, decodingFromYamlShouldStoreAllGivenData) {
|
||||
" - Relev\n"
|
||||
"dirty:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'\n"
|
||||
" util: 'utility'\n"
|
||||
" udr: 1\n"
|
||||
" nav: 2\n"
|
||||
"clean:\n"
|
||||
" - crc: 0x6\n"
|
||||
" utility: 'utility'\n"
|
||||
" util: 'utility'\n"
|
||||
"url:\n"
|
||||
" - 'http://www.example.com'");
|
||||
PluginMetadata plugin = node.as<PluginMetadata>();
|
||||
@@ -1184,7 +1184,7 @@ TEST_P(PluginMetadataTest, decodingFromYamlWithDirtyInfoInARegexPluginMetadataOb
|
||||
YAML::Node node = YAML::Load("name: 'Blank\\.esp'\n"
|
||||
"dirty:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'\n"
|
||||
" util: 'utility'\n"
|
||||
" udr: 1\n"
|
||||
" nav: 2");
|
||||
|
||||
@@ -1195,7 +1195,7 @@ TEST_P(PluginMetadataTest, decodingFromYamlWithCleanInfoInARegexPluginMetadataOb
|
||||
YAML::Node node = YAML::Load("name: 'Blank\\.esp'\n"
|
||||
"clean:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'");
|
||||
" util: 'utility'");
|
||||
|
||||
EXPECT_THROW(node.as<PluginMetadata>(), YAML::RepresentationException);
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ TEST_P(PluginMetadataTest, decodingFromYamlWithAnInvalidRegexNameShouldThrow) {
|
||||
YAML::Node node = YAML::Load("name: 'RagnvaldBook(Farengar(+Ragnvald)?)?\\.esp'\n"
|
||||
"dirty:\n"
|
||||
" - crc: 0x5\n"
|
||||
" utility: 'utility'\n"
|
||||
" util: 'utility'\n"
|
||||
" udr: 1\n"
|
||||
" nav: 2");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user