mirror of
https://github.com/atom/atom.git
synced 2026-02-06 04:34:55 -05:00
Fix breakages due to save method moving to Pane (except saveAll specs)
This commit is contained in:
committed by
probablycorey
parent
3f9ee08e76
commit
685df18a3a
@@ -63,7 +63,7 @@ describe "StatusBar", ->
|
||||
editor.insertText("\n")
|
||||
advanceClock(buffer.stoppedChangingDelay)
|
||||
expect(statusBar.bufferModified.text()).toBe '*'
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(statusBar.bufferModified.text()).toBe ''
|
||||
|
||||
it "disables the buffer modified indicator if the content matches again", ->
|
||||
|
||||
@@ -23,7 +23,7 @@ describe "StripTrailingWhitespace", ->
|
||||
|
||||
# works for buffers that are already open when extension is initialized
|
||||
editor.insertText("foo \nbar\t \n\nbaz")
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "foo\nbar\n\nbaz"
|
||||
|
||||
# works for buffers that are opened after extension is initialized
|
||||
@@ -47,25 +47,25 @@ describe "StripTrailingWhitespace", ->
|
||||
|
||||
it "adds a trailing newline when there is no trailing newline", ->
|
||||
editor.insertText "foo"
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "foo\n"
|
||||
|
||||
it "removes extra trailing newlines and only keeps one", ->
|
||||
editor.insertText "foo\n\n\n\n"
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "foo\n"
|
||||
|
||||
it "leaves a buffer with a single trailing newline untouched", ->
|
||||
editor.insertText "foo\nbar\n"
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "foo\nbar\n"
|
||||
|
||||
it "leaves an empty buffer untouched", ->
|
||||
editor.insertText ""
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe ""
|
||||
|
||||
it "leaves a buffer that is a single newline untouched", ->
|
||||
editor.insertText "\n"
|
||||
editor.save()
|
||||
editor.getBuffer().save()
|
||||
expect(editor.getText()).toBe "\n"
|
||||
|
||||
Reference in New Issue
Block a user