2022-12-01 11:49:57 +00:00
|
|
|
#include "PdfDocument.h"
|
|
|
|
#include "PdfWriter.h"
|
|
|
|
#include "PdfObject.h"
|
|
|
|
#include "File.h"
|
|
|
|
|
|
|
|
#include "TestFramework.h"
|
|
|
|
#include "TestUtils.h"
|
|
|
|
|
|
|
|
TEST_CASE(TestDocumentConverterMarkdownToPdf, "publishing")
|
|
|
|
{
|
|
|
|
auto document = std::make_unique<PdfDocument>();
|
|
|
|
|
|
|
|
PdfWriter writer;
|
2022-12-02 08:44:04 +00:00
|
|
|
const auto output = writer.toString(document.get());
|
2022-12-01 11:49:57 +00:00
|
|
|
|
|
|
|
File pdf_file(TestUtils::getTestOutputDir() / "TestDocumentConverterMarkdownToPdf.pdf");
|
|
|
|
pdf_file.open(File::AccessMode::Write);
|
|
|
|
pdf_file.writeText(output);
|
|
|
|
}
|