parent
a39ab0d607
commit
1c5fb5b75a
28 changed files with 835 additions and 883 deletions
|
|
@ -45,6 +45,9 @@ var JavaScriptMode = require("ace/mode/javascript").Mode;
|
|||
var assert = require("ace/test/assertions");
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "JavaScript Tokenizer",
|
||||
|
||||
setUp : function() {
|
||||
this.tokenizer = new JavaScriptMode().getTokenizer();
|
||||
},
|
||||
|
|
@ -91,10 +94,14 @@ module.exports = {
|
|||
|
||||
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
|
||||
|
||||
assert.equal(3, tokens.length);
|
||||
assert.equal(7, tokens.length);
|
||||
assert.equal("lparen", tokens[0].type);
|
||||
assert.equal("text", tokens[1].type);
|
||||
assert.equal("rparen", tokens[2].type);
|
||||
assert.equal("lparen", tokens[1].type);
|
||||
assert.equal("lparen", tokens[2].type);
|
||||
assert.equal("text", tokens[3].type);
|
||||
assert.equal("rparen", tokens[4].type);
|
||||
assert.equal("rparen", tokens[5].type);
|
||||
assert.equal("rparen", tokens[6].type);
|
||||
},
|
||||
|
||||
"test for last rule in ruleset to catch capturing group bugs" : function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue