Create test/can_open.vim

This commit is contained in:
aiya000 2015-12-22 23:56:27 +09:00
parent 9171179f16
commit dd286da039
2 changed files with 35 additions and 0 deletions

12
test/.themisrc Normal file
View File

@ -0,0 +1,12 @@
" XXX: rewrite generic path
call themis#option('runtimepath', expand('~/Repository/repl.vim'))
" Add dependency
call themis#option('runtimepath', expand('~/.vim/bundle/vimproc.vim'))
call themis#option('runtimepath', expand('~/.vim/bundle/vimshell.vim'))
" Util Functions
function! UnletReplUserVariables() abort
unlet! g:repl_filetype_repl
unlet! g:repl_split_command
endfunction

23
test/can_open.vim Normal file
View File

@ -0,0 +1,23 @@
let s:suite = themis#suite('can_open')
function! s:suite.after_each()
call UnletReplUserVariables()
endfunction
"-------------------"
function! s:suite.some_repl()
" repl.vim can open repl
setfiletype ruby | Repl
new | setfiletype haskell | Repl
new | setfiletype erlang | Repl
new | setfiletype python | Repl
" repl.vim cannot open repl
" but repl.vim don't throw some exception
new | setfiletype unknown | Repl
endfunction
function! s:suite.some_repl_with_split_command()
let g:repl_split_command = 'vertical split'
call s:suite.some_repl()
endfunction