summaryrefslogtreecommitdiff
path: root/sw/qa/extras/htmlexport
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-08-15 19:09:59 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-08-16 01:42:23 +0200
commit5aac78e5fb241050a86714687e9ff8804588ae3c (patch)
tree54e3f50bca7291d8b722b81f22084244e82dd689 /sw/qa/extras/htmlexport
parent9f84cd2766e66bf3bd7878e50a6732f8fca63ed7 (diff)
tdf#132739: sw_htmlexport: Add unittest
Change-Id: I69a5b0659d8b9a13b662ee1e7612e056f9d3ce4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120512 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/htmlexport')
-rw-r--r--sw/qa/extras/htmlexport/data/tdf132739.odtbin0 -> 8832 bytes
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/data/tdf132739.odt b/sw/qa/extras/htmlexport/data/tdf132739.odt
new file mode 100644
index 000000000000..6156aca93bd0
--- /dev/null
+++ b/sw/qa/extras/htmlexport/data/tdf132739.odt
Binary files differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index e58641ac6f8a..cd680b1ad12b 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1021,6 +1021,18 @@ DECLARE_HTMLEXPORT_TEST(testFieldShade, "field-shade.odt")
assertXPath(pDoc, "/html/body/p[2]/span/span", 0);
}
+DECLARE_HTMLEXPORT_TEST(testTdf132739, "tdf132739.odt")
+{
+ htmlDocUniquePtr pDoc = parseHtml(maTempFile);
+ CPPUNIT_ASSERT(pDoc);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: background: #5983b0; border: 1px solid #333333; padding: 0.04in
+ // - Actual : background: #5983b0
+ assertXPath(pDoc, "/html/body/table/tr[1]/td", "style",
+ "background: #5983b0; border: 1px solid #333333; padding: 0.04in");
+}
+
DECLARE_HTMLEXPORT_TEST(testFieldShadeReqIf, "field-shade-reqif.odt")
{
htmlDocUniquePtr pDoc = parseHtml(maTempFile);