From 2fa9e7cf5c488234fbe7a52ec0fa919d12cf9235 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sat, 16 Mar 2013 18:08:31 +0100 Subject: [PATCH] Add failing test for Path#split, where splitting a straight path should produce linear segments. --- test/tests/Path_Curves.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/tests/Path_Curves.js b/test/tests/Path_Curves.js index fd5df777..974dc381 100644 --- a/test/tests/Path_Curves.js +++ b/test/tests/Path_Curves.js @@ -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'); -}); \ No newline at end of file +}); + +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); +});