Add asserts for undoing an insertNewlineAbove

This commit is contained in:
Kevin Sawicki 2013-11-05 16:24:22 -08:00
parent 867a6ecd95
commit 60fa937ed7

View File

@ -1353,13 +1353,16 @@ describe "EditSession", ->
describe "when the cursor is not on the first line", ->
it "inserts a newline above the current line and moves the cursor to the inserted line", ->
editSession.setCursorBufferPosition([3])
editSession.setCursorBufferPosition([3,4])
editSession.insertNewlineAbove()
expect(editSession.getCursorBufferPosition()).toEqual [3,0]
expect(editSession.lineForBufferRow(3)).toBe ''
expect(editSession.lineForBufferRow(4)).toBe ' var pivot = items.shift(), current, left = [], right = [];'
expect(editSession.buffer.getLineCount()).toBe 14
editSession.undo()
expect(editSession.getCursorBufferPosition()).toEqual [3,4]
describe ".backspace()", ->
describe "when there is a single cursor", ->
changeScreenRangeHandler = null