summaryrefslogtreecommitdiffstats
path: root/share/extensions/tests/test_ink2canvas_svg.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /share/extensions/tests/test_ink2canvas_svg.py
parentInitial commit. (diff)
downloadinkscape-12fc8abae6d434cac7670a59ed3a67301cc2eb10.tar.xz
inkscape-12fc8abae6d434cac7670a59ed3a67301cc2eb10.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/extensions/tests/test_ink2canvas_svg.py')
-rw-r--r--share/extensions/tests/test_ink2canvas_svg.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/share/extensions/tests/test_ink2canvas_svg.py b/share/extensions/tests/test_ink2canvas_svg.py
new file mode 100644
index 0000000..ae7a16d
--- /dev/null
+++ b/share/extensions/tests/test_ink2canvas_svg.py
@@ -0,0 +1,38 @@
+#!/usr/bin/en
+# coding=utf-8
+from ink2canvas import Html5Canvas
+from inkex.tester import ComparisonMixin, TestCase
+from inkex.tester.filters import CompareOrderIndependentLines
+from inkex.tester.filters import WindowsTextCompat
+
+
+class Ink2CanvasBasicTest(ComparisonMixin, TestCase):
+ effect_class = Html5Canvas
+ compare_file = "svg/shapes-clipboard.svg"
+ compare_filters = [CompareOrderIndependentLines()]
+ comparisons = [()]
+
+
+class Ink2CanvasTestTextPath(ComparisonMixin, TestCase):
+ effect_class = Html5Canvas
+ compare_file = "svg/multilayered-test.svg"
+ # This file contains a textPath
+ compare_filters = [CompareOrderIndependentLines()]
+ # We don't need a selection for this case, but we need unique filenames for the tester
+ comparisons = [("--id=rect3898",)]
+
+
+class Ink2CanvasTestClosedPath(ComparisonMixin, TestCase):
+ effect_class = Html5Canvas
+ compare_file = "svg/multiple_closed_subpaths.svg"
+ comparisons = [("--id=path31",)]
+ compare_filters = [WindowsTextCompat()]
+
+
+class Ink2CanvasTestCSS(ComparisonMixin, TestCase):
+ """Test CSS styles"""
+
+ effect_class = Html5Canvas
+ compare_file = "svg/styling-css-04-f.svg"
+ comparisons = [("--id=alpha",)]
+ compare_filters = [WindowsTextCompat()]