* @param name Name of the test * @param keys An array of keys or a string with a single key to simulate. * @param endPos The expected end position of the cursor. * @param startPos The position the cursor should start at, defaults to 0, 0.
(name, keys, endPos, startPos)
| 310 | * @param startPos The position the cursor should start at, defaults to 0, 0. |
| 311 | */ |
| 312 | function testMotion(name, keys, endPos, startPos) { |
| 313 | testVim(name, function(cm, vim, helpers) { |
| 314 | if (!startPos) { |
| 315 | startPos = new Pos(0, 0); |
| 316 | } |
| 317 | cm.setCursor(startPos); |
| 318 | helpers.doKeys(keys); |
| 319 | helpers.assertCursorAt(endPos); |
| 320 | }); |
| 321 | } |
| 322 | |
| 323 | function testMotionWithFolding(name, keys, endPos, startPos) { |
| 324 | testVim(name, function (cm, vim, helpers) { |