update tests

This commit is contained in:
nightwing 2013-04-04 10:07:55 +04:00
commit 57fd7dabf2
5 changed files with 11 additions and 11 deletions

View file

@ -45,12 +45,12 @@ module.exports = {
this.mode = new ColdfusionMode();
},
"test: toggle comment lines should not do anything" : function() {
var session = new EditSession([" abc", "cde", "fg"]);
"test: toggle comment lines" : function() {
var session = new EditSession([" abc", " cde", "fg"]);
var range = new Range(0, 3, 1, 1);
var comment = this.mode.toggleCommentLines("start", session, 0, 1);
assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
assert.equal([" <!--abc-->", " <!--cde-->", "fg"].join("\n"), session.toString());
},
"test: next line indent should be the same as the current line indent" : function() {

View file

@ -47,11 +47,11 @@ module.exports = {
this.mode = new CssMode();
},
"test: toggle comment lines should not do anything" : function() {
"test: toggle comment lines" : function() {
var session = new EditSession([" abc", "cde", "fg"].join("\n"));
var comment = this.mode.toggleCommentLines("start", session, 0, 1);
assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
assert.equal(["/* abc*/", "/*cde*/", "fg"].join("\n"), session.toString());
},

View file

@ -45,12 +45,12 @@ module.exports = {
this.mode = new HtmlMode();
},
"test: toggle comment lines should not do anything" : function() {
var session = new EditSession([" abc", "cde", "fg"]);
"test: toggle comment lines" : function() {
var session = new EditSession([" abc", "", "fg"]);
var range = new Range(0, 3, 1, 1);
var comment = this.mode.toggleCommentLines("start", session, 0, 1);
assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
assert.equal([" <!--abc-->", "", "fg"].join("\n"), session.toString());
},
"test: next line indent should be the same as the current line indent" : function() {

View file

@ -72,7 +72,7 @@ module.exports = {
var session = new EditSession([" ", " ", " "]);
this.mode.toggleCommentLines("start", session, 0, 1);
assert.equal(["// ", "// ", " "].join("\n"), session.toString());
assert.equal([" // ", " // ", " "].join("\n"), session.toString());
},
"test: toggle comment with empty lines" : function() {

View file

@ -55,10 +55,10 @@ module.exports = {
},
"test: toggle comment lines should not do anything" : function() {
var session = new EditSession([" abc", "cde", "fg"]);
var session = new EditSession([" abc", " cde", "fg"]);
this.mode.toggleCommentLines("start", session, 0, 1);
assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
assert.equal([" <!-- abc-->", " <!--cde-->", "fg"].join("\n"), session.toString());
},
"test: next line indent should be the same as the current line indent" : function() {