tdf#120003: sw_ww8export3: Add unittest
Added a unittest to ensure that a hyperlink Url is
exported correctly in doc files.
Change-Id: I883abe7edcc669213452f4b92cd1530526a9403d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110510
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/ww8export/data/tdf120003.doc b/sw/qa/extras/ww8export/data/tdf120003.doc
new file mode 100644
index 0000000..c544fa5
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf120003.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 00ab36ac..e18df90 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -210,6 +210,15 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote)
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
}
DECLARE_WW8EXPORT_TEST(testHyperLinkURLSaving, "tdf120003.doc")
{
OUString URL = getProperty<OUString>(getShape(1), "HyperLinkURL");
// Without the fix in place, this test would have failed with
// - Expected: https://www.libreoffice.org/
// - Actual : tps://www.libreoffice.org/
CPPUNIT_ASSERT_EQUAL(OUString("https://www.libreoffice.org/"), URL);
}
DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, "tdf79553_lineNumbers.doc")
{
bool bValue = false;