Revert "Revert "Add spec for inserting white-space-only lines""

This reverts commit fd17457c17.
This commit is contained in:
Michelle Tilley
2016-03-21 16:27:41 -07:00
parent fd17457c17
commit 449abd7364

View File

@@ -83,3 +83,11 @@ describe "Selection", ->
selection.setBufferRange([[2, 0], [2, 10]])
selection.destroy()
expect(selection.marker.isDestroyed()).toBeTruthy()
describe ".insertText(text, options)", ->
it "allows pasting white space only lines when autoIndent is enabled", ->
selection.setBufferRange [[0, 0], [0, 0]]
selection.insertText(" \n \n\n", autoIndent: true)
expect(buffer.lineForRow(0)).toBe " "
expect(buffer.lineForRow(1)).toBe " "
expect(buffer.lineForRow(2)).toBe ""