parent
2a5fe2c382
commit
384581c92c
1 changed files with 32 additions and 15 deletions
|
|
@ -497,8 +497,16 @@ describe "the commands", ->
|
||||||
expect(atom.workspace.open).toHaveBeenCalled()
|
expect(atom.workspace.open).toHaveBeenCalled()
|
||||||
|
|
||||||
describe ":split", ->
|
describe ":split", ->
|
||||||
it "splits the current file upwards", ->
|
it "splits the current file upwards/downward", ->
|
||||||
pane = atom.workspace.getActivePane()
|
pane = atom.workspace.getActivePane()
|
||||||
|
if atom.config.get('ex-mode.splitbelow')
|
||||||
|
spyOn(pane, 'splitDown').andCallThrough()
|
||||||
|
filePath = projectPath('split')
|
||||||
|
editor.saveAs(filePath)
|
||||||
|
keydown(':')
|
||||||
|
submitNormalModeInputText('split')
|
||||||
|
expect(pane.splitDown).toHaveBeenCalled()
|
||||||
|
else
|
||||||
spyOn(pane, 'splitUp').andCallThrough()
|
spyOn(pane, 'splitUp').andCallThrough()
|
||||||
filePath = projectPath('split')
|
filePath = projectPath('split')
|
||||||
editor.saveAs(filePath)
|
editor.saveAs(filePath)
|
||||||
|
|
@ -509,7 +517,16 @@ describe "the commands", ->
|
||||||
# pointing to the same path
|
# pointing to the same path
|
||||||
|
|
||||||
describe ":vsplit", ->
|
describe ":vsplit", ->
|
||||||
it "splits the current file to the left", ->
|
it "splits the current file to the left/right", ->
|
||||||
|
if atom.config.get('ex-mode.splitright')
|
||||||
|
pane = atom.workspace.getActivePane()
|
||||||
|
spyOn(pane, 'splitRight').andCallThrough()
|
||||||
|
filePath = projectPath('vsplit')
|
||||||
|
editor.saveAs(filePath)
|
||||||
|
keydown(':')
|
||||||
|
submitNormalModeInputText('vsplit')
|
||||||
|
expect(pane.splitLeft).toHaveBeenCalled()
|
||||||
|
else
|
||||||
pane = atom.workspace.getActivePane()
|
pane = atom.workspace.getActivePane()
|
||||||
spyOn(pane, 'splitLeft').andCallThrough()
|
spyOn(pane, 'splitLeft').andCallThrough()
|
||||||
filePath = projectPath('vsplit')
|
filePath = projectPath('vsplit')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue