svgio/qa/cppunit/SvgImportTest.cxx | 15 +++++++++++++++ svgio/qa/cppunit/data/tdf97543.svg | 4 ++++ 2 files changed, 19 insertions(+)
New commits: commit 0ab6332f97ec8b12d96f43834febea21e0b39f6a Author: Xisco Fauli <aniste...@gmail.com> Date: Thu Feb 11 23:10:47 2016 +0100 SVGIO: tdf#97543: Add import test Change-Id: Ia89f43ed1da9ead254f191bcbcc4ac338a9dda7a Reviewed-on: https://gerrit.libreoffice.org/22302 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Xisco Faulà <aniste...@gmail.com> diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 9214223..182c4fe 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -47,6 +47,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testTdf79163(); void testTdf97542_1(); void testTdf97542_2(); + void testTdf97543(); Primitive2DSequence parseSvg(const char* aSource); @@ -64,6 +65,7 @@ public: CPPUNIT_TEST(testTdf79163); CPPUNIT_TEST(testTdf97542_1); CPPUNIT_TEST(testTdf97542_2); + CPPUNIT_TEST(testTdf97543); CPPUNIT_TEST_SUITE_END(); }; @@ -269,6 +271,19 @@ void Test::testTdf97542_2() assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient[1]", "radius", "3"); } +void Test::testTdf97543() +{ + // check visibility="inherit" + Primitive2DSequence aSequenceTdf97543 = parseSvg("/svgio/qa/cppunit/data/tdf97543.svg"); + CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf97543.getLength()); + + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf97543)); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", "#00cc00"); +} CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/svgio/qa/cppunit/data/tdf97543.svg b/svgio/qa/cppunit/data/tdf97543.svg new file mode 100644 index 0000000..fa30b22 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf97543.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect x="10" y="10" width="100" height="100" rx="10" ry="10" fill="#00cc00" visibility="inherit" /> +</svg>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits