[Libreoffice-commits] core.git: svgio/qa
Xisco Fauli
anistenis at gmail.com
Mon Nov 2 06:30:42 PST 2015
svgio/qa/cppunit/SvgImportTest.cxx | 15 +++++++++++++++
svgio/qa/cppunit/data/tdf87309.svg | 4 ++++
2 files changed, 19 insertions(+)
New commits:
commit 5654e8f2cfc3ae33da3eae366229b6cb862750bf
Author: Xisco Fauli <anistenis at gmail.com>
Date: Fri Oct 23 00:57:54 2015 +0200
SVG: add import test for tdf#87309
Change-Id: I0f899fbab73ae43e09ca2afc18d956f42ec8b0a7
Reviewed-on: https://gerrit.libreoffice.org/19537
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index d056053..4b87b50 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 0000000..af8a7df
--- /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
More information about the Libreoffice-commits
mailing list