Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #include <swmodeltestbase.hxx>
11 :
12 : #include <swmodule.hxx>
13 : #include <swdll.hxx>
14 : #include <usrpref.hxx>
15 :
16 : #include <test/xmltesttools.hxx>
17 :
18 2 : class DocbookExportTest : public SwModelTestBase
19 : {
20 : public:
21 2 : DocbookExportTest() :
22 2 : SwModelTestBase("/sw/qa/extras/docbookexport/data/", "DocBook File")
23 2 : {}
24 : };
25 :
26 : #define DECLARE_DOCBOOKEXPORT_TEST(TestName, filename) DECLARE_SW_EXPORT_TEST(TestName, filename, DocbookExportTest)
27 :
28 12 : DECLARE_DOCBOOKEXPORT_TEST(testsimple, "simple.docx")
29 : {
30 1 : xmlDocPtr pDoc = parseXml(maTempFile);
31 1 : CPPUNIT_ASSERT(pDoc);
32 :
33 1 : assertXPathContent(pDoc, "/article/para", "aaaa");
34 1 : }
35 :
36 : /* the test actually should crash with this file */
37 12 : DECLARE_DOCBOOKEXPORT_TEST(testtdf91095, "tdf91095.docx")
38 : {
39 1 : xmlDocPtr pDoc = parseXml(maTempFile);
40 1 : CPPUNIT_ASSERT(pDoc);
41 1 : }
42 :
43 :
44 4 : CPPUNIT_PLUGIN_IMPLEMENT();
45 :
46 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|