From bcd02129a3220028fb0345a5f6ae0b2d1e6d9487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 27 Jul 2016 20:12:29 +0200 Subject: [PATCH] Implement additional unit test for #1054. --- test/tests/Path_Boolean.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/tests/Path_Boolean.js b/test/tests/Path_Boolean.js index b68d385b..8e57629b 100644 --- a/test/tests/Path_Boolean.js +++ b/test/tests/Path_Boolean.js @@ -596,6 +596,38 @@ test('#1054', function() { }); compareBoolean(function() { return p1.unite(p2); }, 'M190,350l0,-190l130,0l0,190z'); + + + var cp = new CompoundPath(); + cp.addChild(new Path({ + segments: [ + [150, 100], + [150, 150], + [100, 150], + [100, 100] + ], + closed: true + })); + cp.addChild(new Path({ + segments: [ + [200, 150], + [200, 100], + [220, 100], + [220, 150] + ], + closed: true + })); + var p = new Path({ + segments: [ + [200, 100], + [200, 150], + [120, 150], + [120, 100] + ], + closed: true + }); + compareBoolean(function() { return cp.unite(p); }, + 'M100,150l0,-50l120,0l0,50z'); }); test('#1059', function() {