diff --git a/lib/ace/editor_highlight_selected_word_test.js b/lib/ace/editor_highlight_selected_word_test.js index e5e4aa3f..0f38f1da 100644 --- a/lib/ace/editor_highlight_selected_word_test.js +++ b/lib/ace/editor_highlight_selected_word_test.js @@ -205,11 +205,11 @@ module.exports = { assert.equal(this.session.getTextRange(match), "consectetur"); assert.equal(this.session.$selectionOccurrences.length, 2); - }, + } }; }); if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec() + require("asyncjs").test.testcase(module.exports).exec(); } \ No newline at end of file diff --git a/lib/ace/editor_text_edit_test.js b/lib/ace/editor_text_edit_test.js index f47f0f30..a55234f4 100644 --- a/lib/ace/editor_text_edit_test.js +++ b/lib/ace/editor_text_edit_test.js @@ -488,7 +488,26 @@ module.exports = { var editor = new Editor(new MockRenderer(), session); editor.moveCursorTo(1, 2); editor.transposeLetters(); - assert.position(editor.getCursorPosition(), 1, 3); + assert.position(editor.getCursorPosition(), 1, 3); + }, + + "test: remove to line end": function() { + var session = new EditSession(["123", "4567", "89"]); + + var editor = new Editor(new MockRenderer(), session); + editor.moveCursorTo(1, 2); + editor.removeToLineEnd(); + assert.equal(session.getValue(), ["123", "45", "89"].join("\n")); + }, + + "test: remove to line end at line end should remove the new line": function() { + var session = new EditSession(["123", "4567", "89"]); + + var editor = new Editor(new MockRenderer(), session); + editor.moveCursorTo(1, 4); + editor.removeToLineEnd(); + assert.position(editor.getCursorPosition(), 1, 4); + assert.equal(session.getValue(), ["123", "456789"].join("\n")); } };