diff options
author | Xisco Fauli <anistenis@gmail.com> | 2015-10-23 00:57:54 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-11-02 14:30:19 +0000 |
commit | 5654e8f2cfc3ae33da3eae366229b6cb862750bf (patch) | |
tree | 7ea814a56f8658ba508cdf1eda185568b4b7fb00 /svgio | |
parent | 861b28b88909ec39fc83fccc0ab23d288128aa0e (diff) |
SVG: add import test for tdf#87309
Change-Id: I0f899fbab73ae43e09ca2afc18d956f42ec8b0a7
Reviewed-on: https://gerrit.libreoffice.org/19537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 15 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf87309.svg | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index d0560534a24c..4b87b501a274 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -38,6 +38,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void checkRectPrimitive(Primitive2DSequence& rPrimitive); void testStyles(); + void testTdf87309(); Primitive2DSequence parseSvg(const char* aSource); @@ -47,6 +48,7 @@ public: CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testStyles); + CPPUNIT_TEST(testTdf87309); CPPUNIT_TEST_SUITE_END(); }; @@ -118,6 +120,19 @@ void Test::testStyles() CPPUNIT_ASSERT(arePrimitive2DSequencesEqual(aSequenceRect, aSequenceRectWithStylesByGroup)); } +void Test::testTdf87309() +{ + Primitive2DSequence aSequenceTdf87309 = parseSvg("/svgio/qa/cppunit/data/tdf87309.svg"); + CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf87309.getLength()); + + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(aSequenceTdf87309); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", "#000000"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/svgio/qa/cppunit/data/tdf87309.svg b/svgio/qa/cppunit/data/tdf87309.svg new file mode 100644 index 000000000000..af8a7df254f4 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf87309.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" fill="currentColor"/> +</svg>
\ No newline at end of file |