Check leading spaces as well

This commit is contained in:
Antonio Scandurra
2015-03-17 22:58:14 +01:00
parent c4d2e0eac8
commit 6ac8af2a6e

View File

@@ -128,8 +128,15 @@ describe "DisplayBuffer", ->
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[0].isSoftWrapIndentation).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[1].isSoftWrapIndentation).toBeTruthy()
describe "when editor.softWrapHangingIndentationSpaces is set", ->
beforeEach ->
atom.config.set('editor.softWrapHangingIndentationSpaces', 3)
it "further indents wrapped lines", ->
expect(displayBuffer.tokenizedLineForScreenRow(11).text).toBe " sort(left).concat(pivot).concat(sort(right)"
expect(displayBuffer.tokenizedLineForScreenRow(12).text).toBe " );"
it "correctly tokenizes hanging indentation spaces", ->
atom.config.set("editor.softWrapHangingIndentationSpaces", 3)
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[0].isSoftWrapIndentation).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[1].isSoftWrapIndentation).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[2].isSoftWrapIndentation).toBeTruthy()