Add failing test for Path#split, where splitting a straight path should produce linear segments.

This commit is contained in:
Jonathan Puckey 2013-03-16 18:08:31 +01:00
parent 6f490d8b34
commit 2fa9e7cf5c

View file

@ -95,4 +95,12 @@ test('Curve list after removing a segment - 2', function() {
equals(function() {
return path.curves.length;
}, 1, 'After removing the last segment, we should be left with one curve');
});
});
test('Splitting a straight path should produce linear segments', function() {
var path = new Path.Line([0, 0], [50, 50]);
var path2 = path.split(0, 0.5);
equals(function() {
return path2.firstSegment.linear
}, true);
});