Skip to content

Commit

Permalink
test tagfile generation
Browse files Browse the repository at this point in the history
#test
  • Loading branch information
alandefreitas committed Jan 15, 2025
1 parent 7ff86c0 commit df7ed7d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/TestRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "lib/Lib/CorpusImpl.hpp"
#include "lib/Lib/MrDocsCompilationDatabase.hpp"
#include "lib/Lib/SingleFileDB.hpp"
#include "lib/Gen/hbs/HandlebarsGenerator.hpp"
#include "test_suite/diff.hpp"
#include <mrdocs/Config.hpp>
#include <mrdocs/Generators.hpp>
Expand Down Expand Up @@ -130,6 +131,16 @@ handleFile(
}
replaceCRLFWithLF(generatedDocs);

// Generate tagfile
if (auto hbsGen = dynamic_cast<hbs::HandlebarsGenerator const*>(gen_))
{
std::stringstream ss;
if (auto exp = hbsGen->buildTagfile(ss, **corpus); !exp)
{
return report::error("{}: \"{}\"", exp.error(), filePath);
}
}

// Get expected documentation if it exists
std::unique_ptr<llvm::MemoryBuffer> expectedDocsBuf;
{
Expand Down

0 comments on commit df7ed7d

Please sign in to comment.