stuff-from-scratch/test/compiler/TestTemplatingEngine.cpp

17 lines
401 B
C++
Raw Normal View History

2022-10-12 08:01:19 +00:00
#include "TemplatingEngine.h"
2022-11-30 18:28:50 +00:00
#include "File.h"
2022-10-20 08:00:39 +00:00
2022-12-01 10:52:48 +00:00
#include "TestFramework.h"
#include "TestUtils.h"
2022-10-12 08:01:19 +00:00
2022-11-29 18:00:19 +00:00
TEST_CASE(TestTemplatingEngine, "compiler")
2022-10-12 08:01:19 +00:00
{
2022-12-01 10:52:48 +00:00
auto engine = TemplatingEngine(TestUtils::getTestDataDir());
2022-11-30 18:28:50 +00:00
engine.loadTemplateFiles();
const auto content = engine.processTemplate("index");
2022-10-12 08:01:19 +00:00
2022-12-01 10:52:48 +00:00
File outfile(TestUtils::getTestOutputDir() / "index.html");
outfile.writeText(content);
2022-11-29 18:00:19 +00:00
}