Merge pull request #180 from jazzpi/vim-mode-plus-marks-specs
vim-mode-plus marks & specs
This commit is contained in:
commit
def663b9cc
4 changed files with 38 additions and 8 deletions
38
.travis.yml
38
.travis.yml
|
|
@ -1,13 +1,45 @@
|
||||||
language: objective-c
|
## Project specific config ###
|
||||||
|
language: generic
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- APM_TEST_PACKAGES="vim-mode"
|
global:
|
||||||
|
- APM_TEST_PACKAGES="vim-mode-plus"
|
||||||
|
- ATOM_LINT_WITH_BUNDLED_NODE="true"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
- ATOM_CHANNEL=stable
|
||||||
|
- ATOM_CHANNEL=beta
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
### Generic setup follows ###
|
||||||
|
script:
|
||||||
|
- curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
|
||||||
|
- chmod u+x build-package.sh
|
||||||
|
- ./build-package.sh
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
on_success: never
|
on_success: never
|
||||||
on_failure: change
|
on_failure: change
|
||||||
|
|
||||||
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 10
|
depth: 10
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- build-essential
|
||||||
|
- git
|
||||||
|
- libgnome-keyring-dev
|
||||||
|
- libsecret-1-dev
|
||||||
|
- fakeroot
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Command
|
||||||
else if str[0] is "'" # Parse Mark...
|
else if str[0] is "'" # Parse Mark...
|
||||||
unless @vimState?
|
unless @vimState?
|
||||||
throw new CommandError("Couldn't get access to vim-mode.")
|
throw new CommandError("Couldn't get access to vim-mode.")
|
||||||
mark = @vimState.marks[str[1]]
|
mark = @vimState.mark.marks[str[1]]
|
||||||
unless mark?
|
unless mark?
|
||||||
throw new CommandError("Mark #{str} not set.")
|
throw new CommandError("Mark #{str} not set.")
|
||||||
addr = mark.getEndBufferPosition().row
|
addr = mark.getEndBufferPosition().row
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ describe "the commands", ->
|
||||||
[editor, editorElement, vimState, exState, dir, dir2] = []
|
[editor, editorElement, vimState, exState, dir, dir2] = []
|
||||||
projectPath = (fileName) -> path.join(dir, fileName)
|
projectPath = (fileName) -> path.join(dir, fileName)
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
vimMode = atom.packages.loadPackage('vim-mode')
|
vimMode = atom.packages.loadPackage('vim-mode-plus')
|
||||||
exMode = atom.packages.loadPackage('ex-mode')
|
exMode = atom.packages.loadPackage('ex-mode')
|
||||||
waitsForPromise ->
|
waitsForPromise ->
|
||||||
activationPromise = exMode.activate()
|
activationPromise = exMode.activate()
|
||||||
|
|
@ -42,7 +42,6 @@ describe "the commands", ->
|
||||||
editor = editorElement.getModel()
|
editor = editorElement.getModel()
|
||||||
vimState = vimMode.mainModule.getEditorState(editor)
|
vimState = vimMode.mainModule.getEditorState(editor)
|
||||||
exState = exMode.mainModule.exStates.get(editor)
|
exState = exMode.mainModule.exStates.get(editor)
|
||||||
vimState.activateNormalMode()
|
|
||||||
vimState.resetNormalMode()
|
vimState.resetNormalMode()
|
||||||
editor.setText("abc\ndef\nabc\ndef")
|
editor.setText("abc\ndef\nabc\ndef")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ helpers = require './spec-helper'
|
||||||
describe "the input element", ->
|
describe "the input element", ->
|
||||||
[editor, editorElement, vimState, exState] = []
|
[editor, editorElement, vimState, exState] = []
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
vimMode = atom.packages.loadPackage('vim-mode')
|
vimMode = atom.packages.loadPackage('vim-mode-plus')
|
||||||
exMode = atom.packages.loadPackage('ex-mode')
|
exMode = atom.packages.loadPackage('ex-mode')
|
||||||
waitsForPromise ->
|
waitsForPromise ->
|
||||||
activationPromise = exMode.activate()
|
activationPromise = exMode.activate()
|
||||||
|
|
@ -26,7 +26,6 @@ describe "the input element", ->
|
||||||
atom.commands.dispatch(getCommandEditor(), "core:cancel")
|
atom.commands.dispatch(getCommandEditor(), "core:cancel")
|
||||||
vimState = vimMode.mainModule.getEditorState(editor)
|
vimState = vimMode.mainModule.getEditorState(editor)
|
||||||
exState = exMode.mainModule.exStates.get(editor)
|
exState = exMode.mainModule.exStates.get(editor)
|
||||||
vimState.activateNormalMode()
|
|
||||||
vimState.resetNormalMode()
|
vimState.resetNormalMode()
|
||||||
editor.setText("abc\ndef\nabc\ndef")
|
editor.setText("abc\ndef\nabc\ndef")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue