Skip to content

Commit df7ed7d

Browse files
committed
test tagfile generation
#test
1 parent 7ff86c0 commit df7ed7d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/TestRunner.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "lib/Lib/CorpusImpl.hpp"
1717
#include "lib/Lib/MrDocsCompilationDatabase.hpp"
1818
#include "lib/Lib/SingleFileDB.hpp"
19+
#include "lib/Gen/hbs/HandlebarsGenerator.hpp"
1920
#include "test_suite/diff.hpp"
2021
#include <mrdocs/Config.hpp>
2122
#include <mrdocs/Generators.hpp>
@@ -130,6 +131,16 @@ handleFile(
130131
}
131132
replaceCRLFWithLF(generatedDocs);
132133

134+
// Generate tagfile
135+
if (auto hbsGen = dynamic_cast<hbs::HandlebarsGenerator const*>(gen_))
136+
{
137+
std::stringstream ss;
138+
if (auto exp = hbsGen->buildTagfile(ss, **corpus); !exp)
139+
{
140+
return report::error("{}: \"{}\"", exp.error(), filePath);
141+
}
142+
}
143+
133144
// Get expected documentation if it exists
134145
std::unique_ptr<llvm::MemoryBuffer> expectedDocsBuf;
135146
{

0 commit comments

Comments
 (0)