Travis testing
This commit is contained in:
parent
c76c977414
commit
e61e4906f8
5 changed files with 27 additions and 4 deletions
|
|
@ -2,3 +2,6 @@ if exists("s:loaded")
|
|||
finish
|
||||
endif
|
||||
let s:loaded = 1
|
||||
|
||||
au BufNewFile,BufRead *.nim setlocal filetype=nim
|
||||
au BufNewFile,BufRead *.nims setlocal filetype=nims
|
||||
|
|
|
|||
16
other/tests/vim/outline.py
Normal file
16
other/tests/vim/outline.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from vimtest import cleanup, startNvim
|
||||
|
||||
|
||||
nvim = startNvim()
|
||||
|
||||
|
||||
def test_opening():
|
||||
cleanup(nvim)
|
||||
nvim.command("e outline.nim")
|
||||
nvim.current.buffer[:] = [
|
||||
"var x = 42",
|
||||
"type Y = object",
|
||||
" x, y: int"]
|
||||
nvim.command(":NimOutline")
|
||||
outlinewin = nvim.eval('bufwinnr("__nim_outline__")')
|
||||
assert outlinewin > 0
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
from vimtest import cleanup, startNvim
|
||||
from time import sleep
|
||||
|
||||
nvim = startNvim()
|
||||
|
||||
|
||||
def test_buffer():
|
||||
cleanup(nvim)
|
||||
nvim.command("norm ggdG")
|
||||
nvim.command("norm ihello world")
|
||||
assert nvim.current.buffer[:] == ["hello world"]
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ from neovim import attach
|
|||
|
||||
def cleanup(nvim):
|
||||
nvim.command('bd!')
|
||||
nvim.command('new')
|
||||
|
||||
|
||||
def startNvim():
|
||||
nvim = attach("socket", path="/tmp/nvim")
|
||||
nvim.command("PlugInstall")
|
||||
cleanup(nvim)
|
||||
return nvim
|
||||
|
|
|
|||
|
|
@ -66,15 +66,18 @@ echo -e "\nNimsuggest:"
|
|||
nimsuggest --version
|
||||
|
||||
echo "================================================================================"
|
||||
cd $current/other
|
||||
|
||||
cd $current/other
|
||||
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
cp nvimcfg/init.vim ~/.config/nvim/
|
||||
mkdir -p "$HOME/.config/nvim/undodir"
|
||||
mkdir -p "$HOME/.config/nvim/autoload"
|
||||
mkdir -p "$HOME/.config/nvim/view"
|
||||
cat ~/.config/nvim/autoload/plug.vim
|
||||
|
||||
cd ~/.config/nvim
|
||||
mkdir plugged
|
||||
cd plugged
|
||||
git clone https://github.com/baabelfish/nvim-nim
|
||||
tree ~/.config/nvim
|
||||
|
||||
|
||||
|
|
@ -83,4 +86,5 @@ tree ~/.config/nvim
|
|||
|
||||
echo "================================================================================"
|
||||
echo "Run vim tests"
|
||||
cd $current/other
|
||||
./run_tests.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue