adapt move line test to new behaviour

This commit is contained in:
nightwing 2011-11-18 17:39:56 +04:00
commit 13bb7725ff

View file

@ -301,7 +301,7 @@ module.exports = {
assert.position(editor.getSelection().getSelectionLead(), 0, 0);
},
"test: move line without active selection should move cursor to start of the moved line" : function()
"test: move line without active selection should not move cursor relative to the moved line" : function()
{
var session = new EditSession(["11", "22", "33", "44"].join("\n"));
var editor = new Editor(new MockRenderer(), session);
@ -311,13 +311,13 @@ module.exports = {
editor.moveLinesDown();
assert.equal(["11", "33", "22", "44"].join("\n"), session.toString());
assert.position(editor.getCursorPosition(), 2, 0);
assert.position(editor.getCursorPosition(), 2, 1);
editor.clearSelection();
editor.moveLinesUp();
assert.equal(["11", "22", "33", "44"].join("\n"), session.toString());
assert.position(editor.getCursorPosition(), 1, 0);
assert.position(editor.getCursorPosition(), 1, 1);
},
"test: copy lines down should select lines and place cursor at the selection start" : function() {