From 40e0a5d73a5b7a0f23015ee481a94639400f581d Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 10 Jan 2013 16:10:53 +0100 Subject: doc export: add unit test for fdo#56513 Change-Id: Ie87648368f877af56878bc83fe3d5ece66f77304 Reviewed-on: https://gerrit.libreoffice.org/1644 Reviewed-by: Noel Power Tested-by: Noel Power --- sw/qa/extras/ww8export/data/fdo56513.doc | Bin 0 -> 23040 bytes sw/qa/extras/ww8export/ww8export.cxx | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 sw/qa/extras/ww8export/data/fdo56513.doc (limited to 'sw/qa/extras/ww8export') 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 Binary files /dev/null and b/sw/qa/extras/ww8export/data/fdo56513.doc 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(); -- cgit v1.2.3