From 578c2bd6dffed8a636e64dbfbfedd3eb53539665 Mon Sep 17 00:00:00 2001 From: wout Date: Sun, 30 Jun 2013 11:16:59 +0100 Subject: Fix in unit parser with negative values. --- spec/spec/number.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec') diff --git a/spec/spec/number.js b/spec/spec/number.js index 62e51a2..3d1876c 100644 --- a/spec/spec/number.js +++ b/spec/spec/number.js @@ -23,6 +23,11 @@ describe('Number', function() { expect(number.value).toBe(0.99) expect(number.unit).toBe('%') }) + it('parses a negative percent value', function() { + number = new SVG.Number('-89%') + expect(number.value).toBe(-0.89) + expect(number.unit).toBe('%') + }) }) -- cgit v1.2.3