]> gitweb.michael.orlitzky.com - libsvgtiny-pixbuf.git/commitdiff
test-cases: add a few more test cases targeted at certain code paths
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 8 Aug 2023 14:53:15 +0000 (10:53 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 8 Aug 2023 14:53:15 +0000 (10:53 -0400)
test-cases/model.svg [new file with mode: 0644]
test-cases/symbolic-parent.svg [new file with mode: 0644]
test-cases/symbolic-sibling.svg [new file with mode: 0644]

diff --git a/test-cases/model.svg b/test-cases/model.svg
new file mode 100644 (file)
index 0000000..cb75bf4
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg">
+    <path d="m 16 27.929688 h 96 c 4.433594 0 8 3.570312 8 8 v 50.070312 l -30 30 h -74 c -4.433594 0 -8 -3.566406 -8 -8 v -72.070312 c 0 -4.429688 3.566406 -8 8 -8 z m 0 0" fill="#f6f5f4"/>
+    <path d="m 32.668167 -309.139771 h 138.3125 c 23.65625 0 42.84375 19.171875 42.84375 42.84375 v 138.3125 c 0 23.65625 -19.1875 42.84375 -42.84375 42.84375 h -138.3125 c -23.65625 0 -42.84375 -19.1875 -42.84375 -42.84375 v -138.3125 c 0 -23.671875 19.1875 -42.84375 42.84375 -42.84375 z m 0 0" fill="none" stroke="#3584e4" stroke-linecap="round" stroke-width="16" transform="matrix(0.25 0 0 -0.25 40.543896 20.679901)"/>
+    <path d="m 120 86.125 h -22 c -4.433594 0 -8 3.570312 -8 8 v 21.875 z m 0 0" fill="#deddda"/>
+    <g fill="none">
+        <path d="m 83.00000025 46 v 51" stroke="#99c1f1" stroke-dasharray="2 2" stroke-width="2"/>
+        <path d="m 49.00000025 46 v 51" stroke="#99c1f1" stroke-dasharray="2 2" stroke-width="2"/>
+        <path d="m 31.636917 -181.280396 h 140.375 c 23.09375 0 41.8125 18.71875 41.8125 41.8125 v 12.5 c 0 23.109375 -18.71875 41.828125 -41.8125 41.828125 h -140.375 c -23.09375 0 -41.8125 -18.71875 -41.8125 -41.828125 v -12.5 c 0 -23.09375 18.71875 -41.8125 41.8125 -41.8125 z m 0 0" stroke="#3584e4" stroke-dasharray="16 16" stroke-dashoffset="17.6" stroke-width="16" transform="matrix(0.25 0 0 -0.25 40.543896 20.679901)"/>
+        <path d="m 91.9414065 77.6875 c -1.50390625 -1.69140625 -3.6953125 -2.7578125 -6.14453125 -2.7578125 h -39.59375 c -2.51171875 0 -4.75 1.1171875 -6.25390625 2.88671875" stroke="#99c1f1" stroke-dasharray="2 2" stroke-dashoffset="2.2" stroke-width="2"/>
+    </g>
+</svg>
diff --git a/test-cases/symbolic-parent.svg b/test-cases/symbolic-parent.svg
new file mode 100644 (file)
index 0000000..e3c283e
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg version="1.1"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:xi="http://www.w3.org/2001/XInclude"
+     width="128"
+     height="128">
+  <style type="text/css">
+    rect,circle,path {
+      fill: rgb(0,255,0) !important;
+    }
+    .warning {
+      fill: rgb(0,255,0) !important;
+    }
+    .error {
+      fill: rgb(255,0,0) !important;
+    }
+    .success {
+      fill: rgb(0,255,0) !important;
+    }
+  </style>
+  <g opacity="1">
+  <xi:include href="data:text/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBoZWlnaHQ9IjEyOHB4IiB2aWV3Qm94PSIwIDAgMTI4IDEyOCIgd2lkdGg9IjEyOHB4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0ibSAxNiAyNy45Mjk2ODggaCA5NiBjIDQuNDMzNTk0IDAgOCAzLjU3MDMxMiA4IDggdiA1MC4wNzAzMTIgbCAtMzAgMzAgaCAtNzQgYyAtNC40MzM1OTQgMCAtOCAt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
index 0000000..4ec0ef9
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg version="1.1"
+     xmlns="http://www.w3.org/2000/svg"
+     xmlns:xi="http://www.w3.org/2001/XInclude"
+     width="128"
+     height="128">
+  <style type="text/css">
+    rect,circle,path {
+      fill: rgb(0,255,0) !important;
+    }
+    .warning {
+      fill: rgb(0,255,0) !important;
+    }
+    .error {
+      fill: rgb(255,0,0) !important;
+    }
+    .success {
+      fill: rgb(0,255,0) !important;
+    }
+  </style>
+  <xi:include href="data:text/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBoZWlnaHQ9IjEyOHB4IiB2aWV3Qm94PSIwIDAgMTI4IDEyOCIgd2lkdGg9IjEyOHB4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0ibSAxNiAyNy45Mjk2ODggaCA5NiBjIDQuNDMzNTk0IDAgOCAzLjU3MDMxMiA4IDggdiA1MC4wNzAzMTIgbCAtMzAgMzAgaCAtNzQgYyAtNC40MzM1OTQgMCAtOCAtMy41NjY0MDYgLTggLTggdiAtNzIuMDcwMzEyIGMgMCAtNC40Mjk2ODggMy41NjY0MDYgLTggOCAtOCB6IG0gMCAwIiBmaWxsPSIjZjZmNWY0Ii8+CiAgICA8cGF0aCBkPSJtIDMyLjY2ODE2NyAtMzA5LjEzOTc3MSBoIDEzOC4zMTI1IGMgMjMuNjU2MjUgMCA0Mi44NDM3NSAxOS4xNzE4NzUgNDIuODQzNzUgNDIuODQzNzUgdiAxMzguMzEyNSBjIDAgMjMuNjU2MjUgLTE5LjE4NzUgNDIuODQzNzUgLTQyLjg0Mzc1IDQyLjg0Mzc1IGggLTEzOC4zMTI1IGMgLTIzLjY1NjI1IDAgLTQyLjg0Mzc1IC0xOS4xODc1IC00Mi44NDM3NSAtNDIuODQzNzUgdiAtMTM4LjMxMjU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