fix some more out of date tests
This commit is contained in:
parent
e3000ae39d
commit
93237bd694
3 changed files with 11 additions and 11 deletions
|
|
@ -93,7 +93,7 @@ module.exports = {
|
|||
assert.equal(
|
||||
stringBuilder.join(""),
|
||||
"<span class='ace_cjk ace_invisible' style='width:20px'>" + this.textLayer.SPACE_CHAR + "</span>"
|
||||
+ "<span class='ace_invisible'>¶</span>"
|
||||
+ "<span class='ace_invisible'>\xB6</span>"
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ module.exports = {
|
|||
var tokens = this.tokenizer.getLineTokens("{()}", "start").tokens;
|
||||
|
||||
assert.equal(3, tokens.length);
|
||||
assert.equal("lparen", tokens[0].type);
|
||||
assert.equal("paren.lparen", tokens[0].type);
|
||||
assert.equal("text", tokens[1].type);
|
||||
assert.equal("rparen", tokens[2].type);
|
||||
assert.equal("paren.rparen", tokens[2].type);
|
||||
},
|
||||
|
||||
"test for last rule in ruleset to catch capturing group bugs" : function() {
|
||||
|
|
|
|||
|
|
@ -95,20 +95,20 @@ module.exports = {
|
|||
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
|
||||
|
||||
assert.equal(7, tokens.length);
|
||||
assert.equal("lparen", tokens[0].type);
|
||||
assert.equal("lparen", tokens[1].type);
|
||||
assert.equal("lparen", tokens[2].type);
|
||||
assert.equal("paren.lparen", tokens[0].type);
|
||||
assert.equal("paren.lparen", tokens[1].type);
|
||||
assert.equal("paren.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);
|
||||
assert.equal("paren.rparen", tokens[4].type);
|
||||
assert.equal("paren.rparen", tokens[5].type);
|
||||
assert.equal("paren.rparen", tokens[6].type);
|
||||
},
|
||||
|
||||
"test for last rule in ruleset to catch capturing group bugs" : function() {
|
||||
var tokens = this.tokenizer.getLineTokens("}", "start").tokens;
|
||||
|
||||
assert.equal(1, tokens.length);
|
||||
assert.equal("rparen", tokens[0].type);
|
||||
assert.equal("paren.rparen", tokens[0].type);
|
||||
},
|
||||
|
||||
"test tokenize arithmetic expression which looks like a regexp": function() {
|
||||
|
|
@ -160,7 +160,7 @@ module.exports = {
|
|||
"test // is not a regexp": function() {
|
||||
var tokens = this.tokenizer.getLineTokens("{ // 123", "start").tokens;
|
||||
assert.equal(3, tokens.length);
|
||||
assert.equal("lparen", tokens[0].type);
|
||||
assert.equal("paren.lparen", tokens[0].type);
|
||||
assert.equal("text", tokens[1].type);
|
||||
assert.equal("comment", tokens[2].type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue