Add initial spec of hard tabs aligning

This commit is contained in:
Kevin Sawicki
2014-06-18 16:24:35 -07:00
parent ec8805e99e
commit 8560526158

View File

@@ -344,6 +344,20 @@ describe "TokenizedBuffer", ->
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "#{tabAsSpaces} buy()#{tabAsSpaces}while supply > demand"
it "aligns the hard tabs to the correct tab stop column", ->
buffer.setText """
1\t2
12\t3
123\t4
"""
tokenizedBuffer.setTabLength(4)
fullyTokenize(tokenizedBuffer)
expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2"
expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3"
expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4"
describe "when the buffer contains surrogate pairs", ->
beforeEach ->
waitsForPromise ->