diff --git a/testrunner.cc b/testrunner.cc index 8368c98..0395ecb 100644 --- a/testrunner.cc +++ b/testrunner.cc @@ -13,6 +13,7 @@ #include "nlohmann/json.hpp" #include "meta.hh" #include "support.hh" +#include using namespace std; @@ -145,3 +146,17 @@ Dit was een bericht van OpenTK. } +TEST_CASE("Inja template syntax") { + inja::Environment env; + + for (const auto& entry : std::filesystem::directory_iterator("partials")) { + std::filesystem::path ext = entry.path().extension(); + + if (ext == ".html" || ext == ".txt") { + SUBCASE(entry.path().c_str()) { + CHECK_NOTHROW(env.parse_template(entry.path())); + } + } + } +} +