change navigate right unit test to match OSX
TextEdit behavior
This commit is contained in:
parent
855b43fdad
commit
98f245e975
1 changed files with 7 additions and 18 deletions
|
|
@ -94,43 +94,32 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
"test: move cursor word right" : function() {
|
"test: move cursor word right" : function() {
|
||||||
var session = new EditSession( ["ab",
|
var session = new EditSession([
|
||||||
" Juhu Kinners (abc, 12)", " cde"].join("\n"));
|
"ab",
|
||||||
|
" Juhu Kinners (abc, 12)",
|
||||||
|
" cde"
|
||||||
|
].join("\n"));
|
||||||
|
|
||||||
var selection = session.getSelection();
|
var selection = session.getSelection();
|
||||||
|
|
||||||
selection.moveCursorDown();
|
selection.moveCursorDown();
|
||||||
assert.position(selection.getCursor(), 1, 0);
|
assert.position(selection.getCursor(), 1, 0);
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
|
||||||
assert.position(selection.getCursor(), 1, 1);
|
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
selection.moveCursorWordRight();
|
||||||
assert.position(selection.getCursor(), 1, 5);
|
assert.position(selection.getCursor(), 1, 5);
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
|
||||||
assert.position(selection.getCursor(), 1, 6);
|
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
selection.moveCursorWordRight();
|
||||||
assert.position(selection.getCursor(), 1, 13);
|
assert.position(selection.getCursor(), 1, 13);
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
|
||||||
assert.position(selection.getCursor(), 1, 15);
|
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
selection.moveCursorWordRight();
|
||||||
assert.position(selection.getCursor(), 1, 18);
|
assert.position(selection.getCursor(), 1, 18);
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
|
||||||
assert.position(selection.getCursor(), 1, 20);
|
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
selection.moveCursorWordRight();
|
||||||
assert.position(selection.getCursor(), 1, 22);
|
assert.position(selection.getCursor(), 1, 22);
|
||||||
|
|
||||||
selection.moveCursorWordRight();
|
|
||||||
assert.position(selection.getCursor(), 1, 23);
|
|
||||||
|
|
||||||
// wrap line
|
// wrap line
|
||||||
selection.moveCursorWordRight();
|
selection.moveCursorWordRight();
|
||||||
assert.position(selection.getCursor(), 2, 0);
|
assert.position(selection.getCursor(), 2, 4);
|
||||||
},
|
},
|
||||||
|
|
||||||
"test: select word right if cursor in word" : function() {
|
"test: select word right if cursor in word" : function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue