sw/qa/extras/layout/layout.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit f266feaebea39668392e3a3830e20e4670344658 Author: Mark Hung <mark...@gmail.com> AuthorDate: Sat Oct 3 20:45:47 2020 +0800 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Oct 3 21:51:09 2020 +0200 sw/qa: relax testTdf134146 in layout tests. The old test case expects the number of //text to be 14. I.e. the Y-axis title splits into exactly two lines. But it splits into 3 lines in my environment ( Windows10 traditional Chinese version ). Considering the result might be locale and font dependent, relax the test case so that it passes as long as the title breaks into two or more lines. Change-Id: Ic1da3993c95ecaa7a58d09901a7ce05dd8a34235 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 6f2fea3918a1..3c18aee28a6e 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3122,11 +3122,13 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134146) MetafileXmlDump dumper; xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); CPPUNIT_ASSERT(pXmlDoc); - // Without the accompanying fix in place, this test would have failed with: - // - Expected: 14 - // - Actual : 13 + + const sal_Int32 nTitleLines + = getXPathContent(pXmlDoc, "count(//text[contains(text(),\"Horizontal\")])").toInt32(); + + // Without the accompanying fix in place, this test would have failed. // i.e. the Y axis title didn't break to multiple lines. - assertXPath(pXmlDoc, "//textarray", 14); + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(1), nTitleLines); } CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf136061) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits