From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- share/extensions/tests/test_restack.py | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 share/extensions/tests/test_restack.py (limited to 'share/extensions/tests/test_restack.py') 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", + ), + ] -- cgit v1.2.3