Test failing commands
This commit is contained in:
parent
e58a94802a
commit
68d7b51d9d
7 changed files with 63 additions and 25 deletions
|
|
@ -290,16 +290,19 @@ function! util#goto_file()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
call operator#user#define('nimrepl_send', 'NimReplSend')
|
try
|
||||||
function! NimReplSend(motion_wiseness)
|
call operator#user#define('nimrepl_send', 'NimReplSend')
|
||||||
let start = getpos("'[")
|
function! NimReplSend(motion_wiseness)
|
||||||
let stop = getpos("']")
|
let start = getpos("'[")
|
||||||
let start_line = start[1]
|
let stop = getpos("']")
|
||||||
let stop_line = stop[1]
|
let start_line = start[1]
|
||||||
let str = join(getline(start_line, stop_line), "\n")
|
let stop_line = stop[1]
|
||||||
echom str
|
let str = join(getline(start_line, stop_line), "\n")
|
||||||
call features#repl#send(str)
|
echom str
|
||||||
endfunction
|
call features#repl#send(str)
|
||||||
|
endfunction
|
||||||
|
catch
|
||||||
|
endtry
|
||||||
|
|
||||||
|
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ augroup END
|
||||||
|
|
||||||
augroup nvim_nim_outline
|
augroup nvim_nim_outline
|
||||||
autocmd! FileWritePost *.nim call features#outline#run(1)
|
autocmd! FileWritePost *.nim call features#outline#run(1)
|
||||||
autocmd! VimResized,WinEnter * call features#outline#render()
|
autocmd! VimResized,WinEnter *.nim call features#outline#render()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
if g:nvim_nim_highlighter_enable
|
if g:nvim_nim_highlighter_enable
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
filetype off
|
filetype off
|
||||||
set rtp+=./plugins/vader.vim
|
set rtp+=./plugins/vader.vim
|
||||||
set rtp+=./plugins/nvim-nim
|
set rtp+=..
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
syntax enable
|
syntax enable
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Intall plugins
|
# Intall plugins
|
||||||
mkdir plugins
|
if [[ ! -d plugins ]]; then
|
||||||
git clone https://github.com/baabelfish/vader.vim plugins/vader.vim
|
mkdir plugins
|
||||||
git clone https://github.com/baabelfish/nvim-nim plugins/nvim-nim
|
git clone https://github.com/baabelfish/vader.vim plugins/vader.vim
|
||||||
|
# git clone https://github.com/baabelfish/nvim-nim plugins/nvim-nim
|
||||||
|
fi
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
nvim -u rc.vim -c 'Vader! tests/**/*.vader'
|
nvim -c 'Vader! tests/**/*.vader' > /dev/null
|
||||||
err=$?
|
err=$?
|
||||||
if [ "$err" != "0" ]; then
|
if [ "$err" != "0" ]; then
|
||||||
cat report.log
|
cat report.log
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Great success!"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,36 @@
|
||||||
Do (file):
|
Given nim:
|
||||||
ifoo\<esc>
|
echo "hello"
|
||||||
|
|
||||||
Expect (else):
|
Do:
|
||||||
foo
|
gg
|
||||||
|
|
||||||
|
Then:
|
||||||
|
AssertEqual "nim", &filetype
|
||||||
|
Assert exists(":NimDebug") > 0
|
||||||
|
Assert exists(":NimDefinition") > 0
|
||||||
|
Assert exists(":NimInfo") > 0
|
||||||
|
Assert exists(":NimWeb") > 0
|
||||||
|
Assert exists(":NimUsages") > 0
|
||||||
|
Assert exists(":NimUsagesProject") > 0
|
||||||
|
Assert exists(":NimRenameSymbol") > 0
|
||||||
|
Assert exists(":NimRenameSymbolProject") > 0
|
||||||
|
Assert exists(":NimDebug") > 0
|
||||||
|
Assert exists(":NimOutline") > 0
|
||||||
|
Assert exists(":NimOutlineUpdate") > 0
|
||||||
|
|
||||||
Execute (something):
|
Execute:
|
||||||
AssertEqual 1, 2
|
NimInfo
|
||||||
|
NimDebug
|
||||||
|
NimDefinition
|
||||||
|
NimUsages
|
||||||
|
NimUsagesProject
|
||||||
|
NimOutline
|
||||||
|
|
||||||
|
Given cpp:
|
||||||
|
std::cout << "hello world" << std::endl;
|
||||||
|
|
||||||
|
Do:
|
||||||
|
gg
|
||||||
|
|
||||||
|
Then:
|
||||||
|
AssertEqual "cpp", &filetype
|
||||||
|
|
|
||||||
6
other/testwatcher.sh
Executable file
6
other/testwatcher.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
while inotifywait -r -q -e close_write "../autoload" "."
|
||||||
|
do
|
||||||
|
./run_tests.sh
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
@ -81,9 +81,6 @@ git clone https://github.com/baabelfish/nvim-nim
|
||||||
tree ~/.config/nvim
|
tree ~/.config/nvim
|
||||||
|
|
||||||
|
|
||||||
# echo "Run nim tests"
|
|
||||||
# nim c tests/nimsuggest/suggestions.nim
|
|
||||||
|
|
||||||
echo "================================================================================"
|
echo "================================================================================"
|
||||||
echo "Run vim tests"
|
echo "Run vim tests"
|
||||||
cd $current/other
|
cd $current/other
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue