diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-02-11 23:10:47 +0100 |
---|---|---|
committer | Xisco Faulí <anistenis@gmail.com> | 2016-02-11 23:32:02 +0000 |
commit | 0ab6332f97ec8b12d96f43834febea21e0b39f6a (patch) | |
tree | 970d1f5d2bc24ea713842a6adc7dc3beab50f455 /svgio | |
parent | 6e38a392c817cef128dff2bd0d7c37de9e3cc57a (diff) |
SVGIO: tdf#97543: Add import test
Change-Id: Ia89f43ed1da9ead254f191bcbcc4ac338a9dda7a
Reviewed-on: https://gerrit.libreoffice.org/22302
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 15 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf97543.svg | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 921422387f5f..182c4fe1f8af 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 000000000000..fa30b224470c --- /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>
|