Merge branch 'master' into indent-soft-wrap

This commit is contained in:
Antonio Scandurra
2015-02-24 08:30:36 +01:00
12 changed files with 51 additions and 26 deletions

View File

@@ -54,3 +54,27 @@ describe "GitRepositoryProvider", ->
directory = new Directory dirPath
provider.repositoryForDirectory(directory).then (result) ->
expect(result).toBe null
describe "when specified a Directory without existsSync()", ->
directory = null
provider = null
beforeEach ->
provider = new GitRepositoryProvider atom.project
# An implementation of Directory that does not implement existsSync().
subdirectory = {}
directory =
getSubdirectory: ->
isRoot: -> true
spyOn(directory, "getSubdirectory").andReturn(subdirectory)
it "returns null", ->
repo = provider.repositoryForDirectorySync(directory)
expect(repo).toBe null
expect(directory.getSubdirectory).toHaveBeenCalledWith(".git")
it "returns a Promise that resolves to null for the async implementation", ->
waitsForPromise ->
provider.repositoryForDirectory(directory).then (repo) ->
expect(repo).toBe null
expect(directory.getSubdirectory).toHaveBeenCalledWith(".git")

View File

@@ -839,6 +839,11 @@ describe "TextEditorPresenter", ->
expect(presenter.state.content.lines[oldLine3.id]).toBeUndefined()
expect(presenter.state.content.lines[newLine3.id]).toBeDefined()
it "does not attempt to preserve lines corresponding to ::mouseWheelScreenRow if they have been deleted", ->
presenter = buildPresenter(explicitHeight: 25, scrollTop: 0, lineHeight: 10, lineOverdrawMargin: 1, stoppedScrollingDelay: 200)
presenter.setMouseWheelScreenRow(10)
editor.setText('')
describe "[lineId]", -> # line state objects
it "includes the .endOfLineInvisibles if the editor.showInvisibles config option is true", ->
editor.setText("hello\nworld\r\n")