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() {
|
||||
var session = new EditSession( ["ab",
|
||||
" Juhu Kinners (abc, 12)", " cde"].join("\n"));
|
||||
var session = new EditSession([
|
||||
"ab",
|
||||
" Juhu Kinners (abc, 12)",
|
||||
" cde"
|
||||
].join("\n"));
|
||||
|
||||
var selection = session.getSelection();
|
||||
|
||||
selection.moveCursorDown();
|
||||
assert.position(selection.getCursor(), 1, 0);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 1);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 5);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 6);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 13);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 15);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 18);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 20);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 22);
|
||||
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 1, 23);
|
||||
|
||||
// wrap line
|
||||
selection.moveCursorWordRight();
|
||||
assert.position(selection.getCursor(), 2, 0);
|
||||
assert.position(selection.getCursor(), 2, 4);
|
||||
},
|
||||
|
||||
"test: select word right if cursor in word" : function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue