[PATCH] doc export: add unit test for fdo#56513

Pierre-Eric Pelloux-Prayer (via Code Review) gerrit at gerrit.libreoffice.org
Fri Jan 11 05:44:10 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1644

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/44/1644/1

doc export: add unit test for fdo#56513

Change-Id: Ie87648368f877af56878bc83fe3d5ece66f77304
---
A sw/qa/extras/ww8export/data/fdo56513.doc
M sw/qa/extras/ww8export/ww8export.cxx
2 files changed, 9 insertions(+), 0 deletions(-)



diff --git a/sw/qa/extras/ww8export/data/fdo56513.doc b/sw/qa/extras/ww8export/data/fdo56513.doc
new file mode 100644
index 0000000..f5be1c3
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/fdo56513.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index f7a8f04..7c61d95 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -42,6 +42,7 @@
     void testFdo46020();
     void testFirstHeaderFooter();
     void testZoom();
+    void test56513();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -61,6 +62,7 @@
         {"fdo46020.odt", &Test::testFdo46020},
         {"first-header-footer.doc", &Test::testFirstHeaderFooter},
         {"zoom.doc", &Test::testZoom},
+        {"fdo56513.doc", &Test::test56513},
     };
     header();
     for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -145,6 +147,13 @@
     CPPUNIT_ASSERT_EQUAL(sal_Int16(42), nValue);
 }
 
+void Test::test56513()
+{
+    CPPUNIT_ASSERT_EQUAL(OUString("This is the header of the first section"),  parseDump("/root/page[1]/header/txt/text()"));
+    CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header of the second section"),   parseDump("/root/page[2]/header/txt/text()"));
+    CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page header of the second section"),  parseDump("/root/page[3]/header/txt/text()"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();

-- 
To view, visit https://gerrit.libreoffice.org/1644
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie87648368f877af56878bc83fe3d5ece66f77304
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Pierre-Eric Pelloux-Prayer <pierre-eric at lanedo.com>



More information about the LibreOffice mailing list