From e7d9699999584dc332d738243c4950f3acc68973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 1 Dec 2012 11:05:48 -0800 Subject: [PATCH] Define failing test for cloning complex imported SVG compound paths. Something with #clockwise goes wrong there. --- test/lib/helpers.js | 6 ++++++ test/tests/SvgImport.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/lib/helpers.js b/test/lib/helpers.js index b72bb294..bfbad71f 100644 --- a/test/lib/helpers.js +++ b/test/lib/helpers.js @@ -335,3 +335,9 @@ function compareItems(item, item2, checkIdentity) { } } } + +// SVG + +function createSvg(xml) { + return new DOMParser().parseFromString('' + xml + '', 'application/xml'); +} \ No newline at end of file diff --git a/test/tests/SvgImport.js b/test/tests/SvgImport.js index 1f46fd8b..a8329d7e 100644 --- a/test/tests/SvgImport.js +++ b/test/tests/SvgImport.js @@ -18,6 +18,12 @@ module('SvgImport'); +test('Import complex CompoundPath and clone', function() { + var svg = createSvg(';'); + var item = paper.project.importSvg(svg.getElementById('path')); + compareItems(item, item.clone()); +}); + test('make an svg line', function() { var svgns = 'http://www.w3.org/2000/svg'; var shape = document.createElementNS(svgns, 'line');