fix selection tests

This commit is contained in:
nightwing 2012-04-20 13:34:37 +04:00
commit 5422ecb793

View file

@ -102,6 +102,7 @@ module.exports = {
].join("\n"));
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorDown();
assert.position(selection.getCursor(), 1, 0);
@ -144,6 +145,7 @@ module.exports = {
].join("\n"));
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorDown();
selection.moveCursorLineEnd();
@ -171,6 +173,7 @@ module.exports = {
"test: moveCursor word left with umlauts" : function() {
var session = new EditSession(" Fuß Füße");
session.$selectLongWords = true;
var selection = session.getSelection();
selection.moveCursorTo(0, 9)
@ -184,6 +187,7 @@ module.exports = {
"test: select word left if cursor in word" : function() {
var session = new EditSession("Juhu Kinners");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 8);
@ -244,6 +248,7 @@ module.exports = {
"test: select word with cursor betwen white space and word should select the word" : function() {
var session = new EditSession("Juhu Kinners");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 4);
selection.selectWord();
@ -263,6 +268,7 @@ module.exports = {
"test: select word with cursor in white space should select white space" : function() {
var session = new EditSession("Juhu Kinners");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 5);
selection.selectWord();
@ -275,6 +281,7 @@ module.exports = {
"test: moving cursor should fire a 'changeCursor' event" : function() {
var session = new EditSession("Juhu Kinners");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 5);
@ -290,6 +297,7 @@ module.exports = {
"test: calling setCursor with the same position should not fire an event": function() {
var session = new EditSession("Juhu Kinners");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 5);
@ -305,6 +313,7 @@ module.exports = {
"test: moveWordright should move past || and [": function() {
var session = new EditSession("||foo[");
var selection = session.getSelection();
session.$selectLongWords = true;
// Move behind ||foo
selection.moveCursorWordRight();
@ -318,6 +327,7 @@ module.exports = {
"test: moveWordLeft should move past || and [": function() {
var session = new EditSession("||foo[");
var selection = session.getSelection();
session.$selectLongWords = true;
selection.moveCursorTo(0, 6);