mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
+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/1.1.0.tar.gz"
|
||||
URL "https://github.com/loot/testing-metadata/archive/1.2.0.tar.gz"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
@@ -44,13 +44,16 @@ void MetadataList::Load(const boost::filesystem::path& filepath) {
|
||||
YAML::Node metadataList = YAML::Load(in);
|
||||
in.close();
|
||||
|
||||
if (!metadataList.IsMap())
|
||||
throw FileAccessError("The root of the metadata file " + filepath.string() + " is not a YAML map.");
|
||||
|
||||
if (metadataList["plugins"]) {
|
||||
for (const auto& node : metadataList["plugins"]) {
|
||||
PluginMetadata plugin(node.as<PluginMetadata>());
|
||||
if (plugin.IsRegexPlugin())
|
||||
regexPlugins_.push_back(plugin);
|
||||
else if (!plugins_.insert(plugin).second)
|
||||
throw FileAccessError("More than one entry exists for \"" + plugin.Name() + "\"");
|
||||
throw FileAccessError("More than one entry exists for \"" + plugin.Name() + "\"");
|
||||
}
|
||||
}
|
||||
if (metadataList["globals"])
|
||||
|
||||
@@ -37,7 +37,9 @@ protected:
|
||||
metadataPath("./testing-metadata/masterlist.yaml"),
|
||||
savedMetadataPath("./testing-metadata/saved.masterlist.yaml"),
|
||||
missingMetadataPath("./missing-metadata.yaml"),
|
||||
invalidMetadataPaths({"./testing-metadata/invalid/non_unique.yaml"}) {}
|
||||
invalidMetadataPaths({
|
||||
"./testing-metadata/invalid/non_map_root.yaml",
|
||||
"./testing-metadata/invalid/non_unique.yaml"}) {}
|
||||
|
||||
inline virtual void SetUp() {
|
||||
CommonGameTestFixture::SetUp();
|
||||
|
||||
Reference in New Issue
Block a user