diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-03-27 16:12:41 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-03-27 22:03:09 +0100 |
commit | 6b15374d1850de13e977cf4bb2106d38e74a030a (patch) | |
tree | 3c836240197a5adc5a3211fb5010dc4fb827ebae /svgio/qa | |
parent | 6f89e03f3903474bc51ef8396eb366326cfc254c (diff) |
tdf#156579: svgio: Add unittest
Change-Id: I77ab0c72209fa02c6e463351e8cda09213d47ac3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165399
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/qa')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 8 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf156579.svg | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 8256f6392725..4cab973b5003 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -434,6 +434,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf145896) assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#0000ff"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf156579) +{ + xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156579.svg"); + + // Without the fix in place, nothing would be displayed + assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#0000ff"); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf156168) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156168.svg"); diff --git a/svgio/qa/cppunit/data/tdf156579.svg b/svgio/qa/cppunit/data/tdf156579.svg new file mode 100644 index 000000000000..27610784dd87 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf156579.svg @@ -0,0 +1,8 @@ +<?xml version='1.0' encoding='UTF-8' ?> +<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width="310.024" height="72.283" viewBox="0 0 310.024 72.283"> + <switch> + <foreignObject requiredExtensions="" x="0" y="0" width="0" height="0"> + </foreignObject> + <rect x="0" y="0" height="100" width="100" fill="blue"></rect> + </switch> +</svg> |