Implement unit test for #1054

Closes #1054
This commit is contained in:
Jürg Lehni 2016-06-13 14:54:13 +02:00
parent ea5a635edf
commit 0cb9c50e8f

View file

@ -524,6 +524,33 @@ test('#968', function() {
'M352,280l0,64c0,0 -13.69105,1.79261 -31.82528,4.17778c-15.66463,-26.96617 31.82528,-89.12564 31.82528,-68.17778z');
});
test('#1054', function() {
var p1 = new Path({
segments: [
[310, 170],
[200, 170],
[200, 350],
[190, 350],
[190, 160],
[320, 160],
[320, 350],
[310, 350]
],
closed: true
});
var p2 = new Path({
segments: [
[195, 165],
[315, 165],
[315, 350],
[195, 350]
],
closed: true
});
compareBoolean(function() { return p1.unite(p2); },
'M190,350l0,-190l130,0l0,190z');
});
test('#1059', function() {
var p1 = new paper.Path({
segments: [