[Libreoffice-commits] core.git: sw/qa
Daniel Arato (NISZ) (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 3 05:29:23 UTC 2020
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 58 ++++++++++++++----------------
1 file changed, 28 insertions(+), 30 deletions(-)
New commits:
commit a53e0459280a06a3794cd2a83fd7fbca90fb7ea5
Author: Daniel Arato (NISZ) <arato.daniel at nisz.hu>
AuthorDate: Mon Aug 31 13:32:05 2020 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Sep 3 07:28:46 2020 +0200
tdf#129423 sw: export-only tests, part 12
Convert some unit tests from "export" tests to "export only".
Remove nullptr checks on parseExport's return value to make
the tests fail if parsing fails for any reason.
Change-Id: I847248fdf3c72ba6e5a4f40337d644918d02d07c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101723
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a62a3035bf03..e5fd69650911 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -75,42 +75,40 @@ DECLARE_OOXMLEXPORT_TEST(testFdo55381, "fdo55381.docx")
//TODO: frames not located on the correct pages
}
-DECLARE_OOXMLEXPORT_TEST(testDocm, "hello.docm")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDocm, "hello.docm")
{
// Make sure that we check the name of the export filter.
// This was application/vnd.ms-word.document.macroEnabled.main+xml when the
// name of the import filter was checked.
- if (xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml"))
- assertXPath(pXmlDoc,
- "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']",
- "ContentType",
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Override[@PartName='/word/document.xml']",
+ "ContentType",
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
}
-DECLARE_OOXMLEXPORT_TEST(testDefaultContentTypes, "fdo55381.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDefaultContentTypes, "fdo55381.docx")
{
- if (xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml"))
- {
- assertXPath(pXmlDoc,
- "/ContentType:Types/ContentType:Default[@Extension='xml']",
- "ContentType",
- "application/xml");
+ xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='xml']",
+ "ContentType",
+ "application/xml");
- assertXPath(pXmlDoc,
- "/ContentType:Types/ContentType:Default[@Extension='rels']",
- "ContentType",
- "application/vnd.openxmlformats-package.relationships+xml");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='rels']",
+ "ContentType",
+ "application/vnd.openxmlformats-package.relationships+xml");
- assertXPath(pXmlDoc,
- "/ContentType:Types/ContentType:Default[@Extension='png']",
- "ContentType",
- "image/png");
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='png']",
+ "ContentType",
+ "image/png");
- assertXPath(pXmlDoc,
- "/ContentType:Types/ContentType:Default[@Extension='jpeg']",
- "ContentType",
- "image/jpeg");
- }
+ assertXPath(pXmlDoc,
+ "/ContentType:Types/ContentType:Default[@Extension='jpeg']",
+ "ContentType",
+ "image/jpeg");
}
DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest)
@@ -1121,11 +1119,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly, "tdf121670_columns
CPPUNIT_ASSERT_EQUAL_MESSAGE("# of columns", sal_Int16(0), xTextColumns->getColumnCount());
}
-DECLARE_OOXMLEXPORT_TEST(testTdf106492, "tdf106492.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf106492, "tdf106492.docx")
{
- if (xmlDocUniquePtr pXmlDoc = parseExport())
- // This was 4: an additional sectPr was added to the document.
- assertXPath(pXmlDoc, "//w:sectPr", 3);
+ xmlDocUniquePtr pXmlDoc = parseExport();
+ // This was 4: an additional sectPr was added to the document.
+ assertXPath(pXmlDoc, "//w:sectPr", 3);
}
DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx")
More information about the Libreoffice-commits
mailing list