Fix tests in EditSession

This commit is contained in:
Ben Ogle
2013-07-17 17:56:52 -07:00
parent c937827582
commit 2aca31988f

View File

@@ -1717,10 +1717,10 @@ describe "EditSession", ->
editSession.setSelectedBufferRange([[4, 5], [7, 5]])
editSession.toggleLineCommentsInSelection()
expect(buffer.lineForRow(4)).toBe "// while(items.length > 0) {"
expect(buffer.lineForRow(5)).toBe "// current = items.shift();"
expect(buffer.lineForRow(6)).toBe "// current < pivot ? left.push(current) : right.push(current);"
expect(buffer.lineForRow(7)).toBe "// }"
expect(buffer.lineForRow(4)).toBe " // while(items.length > 0) {"
expect(buffer.lineForRow(5)).toBe " // current = items.shift();"
expect(buffer.lineForRow(6)).toBe " // current < pivot ? left.push(current) : right.push(current);"
expect(buffer.lineForRow(7)).toBe " // }"
expect(editSession.getSelectedBufferRange()).toEqual [[4, 8], [7, 8]]
editSession.toggleLineCommentsInSelection()
@@ -1732,9 +1732,9 @@ describe "EditSession", ->
it "does not comment the last line of a non-empty selection if it ends at column 0", ->
editSession.setSelectedBufferRange([[4, 5], [7, 0]])
editSession.toggleLineCommentsInSelection()
expect(buffer.lineForRow(4)).toBe "// while(items.length > 0) {"
expect(buffer.lineForRow(5)).toBe "// current = items.shift();"
expect(buffer.lineForRow(6)).toBe "// current < pivot ? left.push(current) : right.push(current);"
expect(buffer.lineForRow(4)).toBe " // while(items.length > 0) {"
expect(buffer.lineForRow(5)).toBe " // current = items.shift();"
expect(buffer.lineForRow(6)).toBe " // current < pivot ? left.push(current) : right.push(current);"
expect(buffer.lineForRow(7)).toBe " }"
it "uncomments lines if all lines match the comment regex", ->