summaryrefslogtreecommitdiffstats
path: root/share/extensions/tests/test_restack.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_restack.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_restack.py')
-rw-r--r--share/extensions/tests/test_restack.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/share/extensions/tests/test_restack.py b/share/extensions/tests/test_restack.py
new file mode 100644
index 0000000..620a906
--- /dev/null
+++ b/share/extensions/tests/test_restack.py
@@ -0,0 +1,40 @@
+# coding=utf-8
+from restack import Restack
+from inkex.tester import ComparisonMixin, TestCase
+
+
+class RestackBasicTest(ComparisonMixin, TestCase):
+ effect_class = Restack
+ old_defaults = ("--direction=tb", "--xanchor=m", "--yanchor=m")
+ comparisons = [
+ ("--tab=positional", "--id=p1", "--id=r3") + old_defaults,
+ ("--tab=z_order", "--id=p1", "--id=r3") + old_defaults,
+ ("--tab=z_order", "--id=r3", "--id=p1", "--id=t5", "--id=r2") + old_defaults,
+ ("--tab=z_order", "--id=r2", "--id=t5", "--id=p1", "--id=r3") + old_defaults,
+ (
+ "--nb_direction=custom",
+ "--angle=50.0",
+ "--id=s1",
+ "--id=p1",
+ "--id=c3",
+ "--id=slicerect1",
+ )
+ + old_defaults,
+ ]
+
+
+class RestackMillimeterGrouped(ComparisonMixin, TestCase):
+ """Test for https://gitlab.com/inkscape/extensions/-/issues/372"""
+
+ effect_class = Restack
+ compare_file = "svg/restack_grouped.svg"
+ comparisons = [
+ (
+ "--id=g20858",
+ "--id=g21085",
+ "--id=g20940",
+ "--id=g26580",
+ "--id=g21081",
+ "--id=g20854",
+ ),
+ ]