mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Fix tests in EditSession
This commit is contained in:
@@ -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", ->
|
||||
|
||||
Reference in New Issue
Block a user