diff --git a/test/gtest_schema.cpp b/test/gtest_schema.cpp index 68b7d69aa9989d94977cae40bbd1ea0ffe046975..835ba1c48d521ab9a099fb83989fd44ce5bd0d04 100644 --- a/test/gtest_schema.cpp +++ b/test/gtest_schema.cpp @@ -119,6 +119,23 @@ TEST(Schema, validate_all_schemas) ASSERT_TRUE(validateAllSchemas({plugin_dir + "/schema", wolf_schema_dir}, true)); } +TEST(Schema, duplicated_schemas) +{ + std::set<std::string> schemas_found; + + for (auto const& entry : filesystem::recursive_directory_iterator(plugin_dir)) + { + if (filesystem::is_regular_file(entry) and entry.path().extension().string() == ".schema") + { + ASSERT_FALSE(schemas_found.count(entry.path().filename().string())); + schemas_found.insert(entry.path().filename().string()); + } + } + + WOLF_INFO("Found ", schemas_found.size(), " schema files."); +} + + int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv);