office-gobmx/sw/qa/extras/docbookexport/docbookexport.cxx
Miklos Vajna 34ca24d35a CppunitTest_sw_docbookexport: rework to avoid DECLARE_DOCBOOKEXPORT_TEST()
No need go via Writer-specific macros.

Change-Id: I68619a8cc610d7aa2d14657adaf8a7806060ced5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164079
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-28 10:03:52 +01:00

44 lines
1.1 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <swmodeltestbase.hxx>
namespace
{
class DocbookExportTest : public SwModelTestBase
{
public:
DocbookExportTest() :
SwModelTestBase("/sw/qa/extras/docbookexport/data/", "DocBook File")
{}
};
CPPUNIT_TEST_FIXTURE(DocbookExportTest, testsimple)
{
createSwDoc("simple.docx");
save(mpFilter);
xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc);
assertXPathContent(pDoc, "/article/para"_ostr, "aaaa");
}
/* the test actually should crash with this file */
CPPUNIT_TEST_FIXTURE(DocbookExportTest, testtdf91095)
{
createSwDoc("tdf91095.docx");
save(mpFilter);
xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc);
}
} // end of anonymous namespace
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */