diff options
| author | Misko Hevery | 2010-10-15 14:06:30 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-10-15 14:06:30 -0700 | 
| commit | ff52f47537c9bf5c6acc636f25ae5f7f70d20f3b (patch) | |
| tree | e202d6f8eee4602b44130bf71f1c926e8689645c /test/ParserSpec.js | |
| parent | a36964799be3d21163ba6350d862fced2bbd3437 (diff) | |
| download | angular.js-ff52f47537c9bf5c6acc636f25ae5f7f70d20f3b.tar.bz2 | |
Fix unicode parsing Close #56
Diffstat (limited to 'test/ParserSpec.js')
| -rw-r--r-- | test/ParserSpec.js | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/test/ParserSpec.js b/test/ParserSpec.js index e7b4e7f5..ac359cb0 100644 --- a/test/ParserSpec.js +++ b/test/ParserSpec.js @@ -1,4 +1,4 @@ -desccribe('parser', function(){ +describe('parser', function(){    describe('lexer', function(){      it('should TokenizeAString', function(){        var tokens = lex("a.bc[22]+1.3|f:'a\\\'c':\"d\\\"e\""); @@ -170,6 +170,13 @@ desccribe('parser', function(){        var tokens = lex(".5");        expect(tokens[0].text).toEqual(0.5);      }); + +    it('should throw error on invalid unicode', function(){ +      assertThrows("Lexer Error: Invalid unicode escape [\\u1''b] starting at column '0' in expression ''\\u1''bla''.", function(){ +        lex("'\\u1''bla'"); +      }); +    }); +    });    it('should parse Expressions', function(){ @@ -400,12 +407,6 @@ desccribe('parser', function(){      assertEquals('misko', scope.$eval('n'));    }); -  it('should parse FiltersCanBeGrouped', function () { -    var scope = createScope({name:'MISKO'}); -    assertEquals('misko', scope.$eval('n = (name|lowercase)')); -    assertEquals('misko', scope.$eval('n')); -  }); -    it('should parse Remainder', function () {      var scope = createScope();      assertEquals(1, scope.$eval('1%2')); | 
