diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-06-13 01:32:03 +0500 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-06-13 22:36:25 +0200 |
commit | b3f503c5d88b2314fca9fc9124f918090c8c427b (patch) | |
tree | 7c3c64bb492093813465e147f64c3de6c285bf4f /test | |
parent | 54e46d3425846ed8e5bf84b1bf06ff8cf3aa48ce (diff) |
tdf#161509: Output the same special style names and identifiers as Word
Take care to match the case of the names. Some tools rely on specific
case; so standardize on what Word outputs.
getXPath is modified to tell which XPath has failed (needed for the
unit test).
Change-Id: I3e71f5905b26d7e784d68ba11ff205eefedaaa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168755
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
(cherry picked from commit e74c94c1a6ae47eb507eec610e231ebb6b02a8be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168726
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/xmltesttools.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 06678b1f33f1..a86e39e4b778 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -90,16 +90,16 @@ OUString XmlTestTools::getXPath(const xmlDocUniquePtr& pXmlDoc, const OString& r { CPPUNIT_ASSERT(pXmlDoc); xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, rXPath); - CPPUNIT_ASSERT(pXmlObj); + OString docAndXPath = OString::Concat("In <") + pXmlDoc->name + ">, XPath '" + rXPath; + CPPUNIT_ASSERT_MESSAGE(docAndXPath.getStr(), pXmlObj); xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval; - CPPUNIT_ASSERT(pXmlNodes); - CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(OString::Concat("In <") + pXmlDoc->name + ">, XPath '" + rXPath + "' number of nodes is incorrect").getStr(), + CPPUNIT_ASSERT_MESSAGE(OString(docAndXPath + "' not found").getStr(), pXmlNodes); + CPPUNIT_ASSERT_EQUAL_MESSAGE(OString(docAndXPath + "' number of nodes is incorrect").getStr(), 1, xmlXPathNodeSetGetLength(pXmlNodes)); CPPUNIT_ASSERT(!rAttribute.isEmpty()); xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; xmlChar * prop = xmlGetProp(pXmlNode, BAD_CAST(rAttribute.getStr())); - OString sAttAbsent = OString::Concat("In <") + pXmlDoc->name + ">, XPath '" + rXPath - + "' no attribute '" + rAttribute + "' exist"; + OString sAttAbsent = docAndXPath + "' no attribute '" + rAttribute + "' exist"; CPPUNIT_ASSERT_MESSAGE(sAttAbsent.getStr(), prop); OUString s(convert(prop)); xmlFree(prop); |