From 05554bc47840659e1b9826523c100edfbc8a4ecd Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sun, 7 Feb 2016 23:37:13 +0100 Subject: SVGIO: tdf#79163: Add import test Change-Id: I891425f331e9be21c160eb0b11f05dba280bef23 Reviewed-on: https://gerrit.libreoffice.org/22196 Tested-by: Jenkins Reviewed-by: jan iversen Tested-by: jan iversen --- svgio/qa/cppunit/SvgImportTest.cxx | 16 ++++++++++++++++ svgio/qa/cppunit/data/tdf79163.svg | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 svgio/qa/cppunit/data/tdf79163.svg (limited to 'svgio/qa') diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index f918a1527946..50a7ef7231f2 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -44,6 +44,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testFontsizePercentage(); void testTdf45771(); void testTdf85770(); + void testTdf79163(); Primitive2DSequence parseSvg(const char* aSource); @@ -58,6 +59,7 @@ public: CPPUNIT_TEST(testFontsizePercentage); CPPUNIT_TEST(testTdf45771); CPPUNIT_TEST(testTdf85770); + CPPUNIT_TEST(testTdf79163); CPPUNIT_TEST_SUITE_END(); }; @@ -221,6 +223,20 @@ void Test::testTdf85770() assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "Start "); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "text", "End"); } + +void Test::testTdf79163() +{ + Primitive2DSequence aSequenceTdf79163 = parseSvg("/svgio/qa/cppunit/data/tdf79163.svg"); + CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf79163.getLength()); + + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer(aSequenceTdf79163)); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/mask/unifiedtransparence", "transparence", "0"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/svgio/qa/cppunit/data/tdf79163.svg b/svgio/qa/cppunit/data/tdf79163.svg new file mode 100644 index 000000000000..0153037236c2 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf79163.svg @@ -0,0 +1,8 @@ + + + + + -- cgit a/co-2021 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author