summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric@lanedo.com>2013-01-10 16:10:53 +0100
committerNoel Power <noel.power@suse.com>2013-01-11 16:26:24 +0000
commit40e0a5d73a5b7a0f23015ee481a94639400f581d (patch)
treeefdd29a1fb2b990bfd1a720155ef292e5d7a471b /sw/qa/extras/ww8export
parent58aeb8e6aadd8511a700ec1c289bdc229f7592c9 (diff)
doc export: add unit test for fdo#56513
Change-Id: Ie87648368f877af56878bc83fe3d5ece66f77304 Reviewed-on: https://gerrit.libreoffice.org/1644 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'sw/qa/extras/ww8export')
-rw-r--r--sw/qa/extras/ww8export/data/fdo56513.docbin0 -> 23040 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx9
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 000000000000..f5be1c3cd9ac
--- /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 f7a8f04b7923..7c61d952b6b9 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -42,6 +42,7 @@ public:
void testFdo46020();
void testFirstHeaderFooter();
void testZoom();
+ void test56513();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -61,6 +62,7 @@ void Test::run()
{"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 @@ void Test::testZoom()
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();