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(); this.mode = new ColdfusionMode();
}, },
"test: toggle comment lines should not do anything" : function() { "test: toggle comment lines" : function() {
var session = new EditSession([" abc", " cde", "fg"]); var session = new EditSession([" abc", " cde", "fg"]);
var range = new Range(0, 3, 1, 1); var range = new Range(0, 3, 1, 1);
var comment = this.mode.toggleCommentLines("start", session, 0, 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() { "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(); 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 session = new EditSession([" abc", "cde", "fg"].join("\n"));
var comment = this.mode.toggleCommentLines("start", session, 0, 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());
}, },

View file

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

View file

@ -58,7 +58,7 @@ module.exports = {
var session = new EditSession([" abc", " cde", "fg"]); var session = new EditSession([" abc", " cde", "fg"]);
this.mode.toggleCommentLines("start", session, 0, 1); 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() { "test: next line indent should be the same as the current line indent" : function() {