neosnippet.vim/test/functions.vim

28 lines
863 B
VimL
Raw Normal View History

2015-08-31 20:56:41 +00:00
let s:suite = themis#suite('toml')
let s:assert = themis#helper('assert')
function! s:suite.get_in_paren()
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ '(foobar)'),
2015-08-31 20:56:41 +00:00
\ 'foobar')
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ '(foobar, baz)'),
2015-08-31 20:56:41 +00:00
\ 'foobar, baz')
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ '(foobar, (baz))'),
2015-08-31 20:56:41 +00:00
\ 'foobar, (baz)')
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ 'foobar('),
2015-12-11 16:51:49 +00:00
\ '')
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ 'foobar()'),
\ '')
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ 'foobar(fname)'),
2015-12-11 16:51:49 +00:00
\ 'fname')
2015-12-12 09:08:13 +00:00
call s:assert.equals(neosnippet#handlers#_get_in_paren(
\ 'wait() wait(long, int)'),
\ 'long, int')
2015-08-31 20:56:41 +00:00
endfunction