From df3a3ccc5b486de6a463b44d4e9cea379d859600 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Thu, 18 May 2017 00:38:16 +0200 Subject: [PATCH] Minor change to actually cover the case where a line segment doe not point into the same direction. Also increases coverage by explicitly optimizing a lineto command (instead of only "implicit lineto", i.e. effectively moveto, commands) --- testscour.py | 2 +- unittests/collapse-straight-path-segments.svg | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/testscour.py b/testscour.py index 93e6d6f..8ebaf9d 100755 --- a/testscour.py +++ b/testscour.py @@ -1240,7 +1240,7 @@ class CollapseStraightPathSegments(unittest.TestCase): 'm0 0h10 20', 'm0 0h10 20', 'm0 0h10 20', - 'm0 0 20 40', + 'm0 0 20 40v1l10 20', 'm0 0 10 10-20-20 10 10-20-20', 'm0 0 1 2m1 2 2 4m1 2 2 4', 'm6.3228 7.1547 81.198 45.258'] diff --git a/unittests/collapse-straight-path-segments.svg b/unittests/collapse-straight-path-segments.svg index 10541d2..fa8e030 100644 --- a/unittests/collapse-straight-path-segments.svg +++ b/unittests/collapse-straight-path-segments.svg @@ -21,8 +21,9 @@ - - + +