Modifies sort function and adds a unit test
This commit is contained in:
parent
15296ff369
commit
4312777508
2 changed files with 23 additions and 4 deletions
|
|
@ -983,3 +983,13 @@ describe "the commands", ->
|
|||
expect(calls.length).toEqual 2
|
||||
expect(calls[0].args[0].range).toEqual [0, 2]
|
||||
expect(calls[1].args[0].range).toEqual [3, 3]
|
||||
|
||||
desctibe ':sort', ->
|
||||
beforeEach ->
|
||||
editor.setText('ghi\nabc\njkl\ndef\n')
|
||||
editor.setCursorBufferPosition([0, 0])
|
||||
|
||||
it "sorts entire file if range is not multi-line", ->
|
||||
openEx()
|
||||
submitNormalModeInputText('sort')
|
||||
expect(atom.getText()).toEqual('abc\ndef\nghi\njkl\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue