(cm, wrap, scroll)
| 64 | testCM("movedown_hscroll_resize", function(cm) {testMovedownResize(cm, true);}); |
| 65 | |
| 66 | function testMoveright(cm, wrap, scroll) { |
| 67 | cm.setSize("100px", "100px"); |
| 68 | if (wrap) cm.setOption("lineWrapping", true); |
| 69 | if (scroll) { |
| 70 | cm.setValue("\n" + new Array(100).join("x\n")); |
| 71 | cm.setCursor(Pos(0, 0)); |
| 72 | } |
| 73 | var right = displayRight(cm, scroll); |
| 74 | for (var i = 0; i < 10; i++) { |
| 75 | cm.replaceSelection("xxxxxxxxxx"); |
| 76 | var cursorRight = cm.cursorCoords(null, "window").right; |
| 77 | is(cursorRight < right); |
| 78 | } |
| 79 | if (!wrap) is(cursorRight > right - 20); |
| 80 | } |
| 81 | |
| 82 | testCM("moveright", function(cm) {testMoveright(cm, false, false);}); |
| 83 | testCM("moveright_wrap", function(cm) {testMoveright(cm, true, false);}); |
no test coverage detected