Test new test framework
This commit is contained in:
parent
6f2b869b0c
commit
e58a94802a
3 changed files with 27 additions and 10 deletions
5
other/rc.vim
Normal file
5
other/rc.vim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
filetype off
|
||||
set rtp+=./plugins/vader.vim
|
||||
set rtp+=./plugins/nvim-nim
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
#!/bin/bash
|
||||
export NVIM_LISTEN_ADDRESS="/tmp/nvim"
|
||||
nvim --headless&
|
||||
nvimpid=$!
|
||||
sleep 2
|
||||
sh -c "py.test -v tests/vim/**.py"
|
||||
haderr=$?
|
||||
sleep 1
|
||||
kill $nvimpid
|
||||
wait
|
||||
exit $haderr
|
||||
|
||||
# Intall plugins
|
||||
mkdir plugins
|
||||
git clone https://github.com/baabelfish/vader.vim plugins/vader.vim
|
||||
git clone https://github.com/baabelfish/nvim-nim plugins/nvim-nim
|
||||
|
||||
# Run tests
|
||||
nvim -u rc.vim -c 'Vader! tests/**/*.vader'
|
||||
err=$?
|
||||
if [ "$err" != "0" ]; then
|
||||
cat report.log
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
9
other/tests/vim/smoke.vader
Normal file
9
other/tests/vim/smoke.vader
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Do (file):
|
||||
ifoo\<esc>
|
||||
|
||||
Expect (else):
|
||||
foo
|
||||
|
||||
|
||||
Execute (something):
|
||||
AssertEqual 1, 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue