diff options
| author | Misko Hevery | 2010-10-20 07:22:15 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-10-20 07:22:15 -0700 | 
| commit | 9c8b1800b90e14b643bab6ada8e96f8f850e84a6 (patch) | |
| tree | a2e7642934141bb1a4b7541bff3f2e9f08f39dfb /test/JsonSpec.js | |
| parent | a27198d52e61adb9cedde04e51bbec74e66089da (diff) | |
| download | angular.js-9c8b1800b90e14b643bab6ada8e96f8f850e84a6.tar.bz2 | |
fixed negative numbers in Json
Diffstat (limited to 'test/JsonSpec.js')
| -rw-r--r-- | test/JsonSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/test/JsonSpec.js b/test/JsonSpec.js index 6fc40e09..17bb97b6 100644 --- a/test/JsonSpec.js +++ b/test/JsonSpec.js @@ -100,6 +100,10 @@ describe('json', function(){      expect(fromJson("{value:2.55, name:'misko'}")).toEqual({value:2.55, name:'misko'});    }); +  it('should parse negative / possitve numbers', function() { +    expect(fromJson("{neg:-2.55, pos:+.3, a:[-2, +.1, -.2, +.3]}")).toEqual({neg:-2.55, pos:+.3, a:[-2, +.1, -.2, +.3]}); +  }); +    describe('security', function(){      it('should not allow naked expressions', function(){        expect(function(){fromJson('1+2');}).toThrow("Did not understand '+2' while evaluating '1+2'."); | 
