summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorhomeboy445 <akshitsan13@gmail.com>2021-02-06 12:46:03 +0530
committerXisco Fauli <xiscofauli@libreoffice.org>2021-02-07 18:45:49 +0100
commitf343ad6d8a78798814c9d38261043619b4e2b487 (patch)
treeda8580b780f70a7c62f3473b91ab7a720cf5c90e /sw/qa
parentfdd9b20572435842bde076e3c35ef94d26f13b30 (diff)
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>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ww8export/data/tdf120003.docbin0 -> 10752 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf120003.doc b/sw/qa/extras/ww8export/data/tdf120003.doc
new file mode 100644
index 000000000000..c544fa5a96e0
--- /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 00ab36ac67a2..e18df90483d3 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;