Fix #417 completed snippets parser
This commit is contained in:
@@ -87,11 +87,6 @@ function! s:suite.get_completed_snippet() abort
|
||||
\ 'menu' : '', 'info' : ''
|
||||
\ }, 'foo(', ''), '${1:#:hoge}${2:#:, ...})${3}')
|
||||
|
||||
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
|
||||
\ 'word' : 'foo{', 'abbr' : 'foo{',
|
||||
\ 'menu' : '', 'info' : ''
|
||||
\ }, 'foo{', ''), '${1}}${2}')
|
||||
|
||||
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
|
||||
\ 'word' : 'Dictionary', 'abbr' : 'Dictionary<Key, Value>(foo)',
|
||||
\ 'menu' : '', 'info' : ''
|
||||
@@ -128,14 +123,14 @@ function! s:suite.get_completed_snippet() abort
|
||||
\ 'menu' : '', 'info' : ''
|
||||
\ }, 'forEach', ''), '(${1:#:BiConsumer<>})${2}')
|
||||
|
||||
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
|
||||
\ 'word' : 'for[', 'abbr' : '',
|
||||
\ 'menu' : '', 'info' : ''
|
||||
\ }, 'for[', ''), '${1}]${2}')
|
||||
|
||||
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
|
||||
\ 'word' : 'something', 'abbr' : 'something(else)',
|
||||
\ 'menu' : '', 'info' : '', 'snippet' : '(${1:custom})${2}'
|
||||
\ }, 'something', ''), '(${1:custom})${2}')
|
||||
|
||||
call s:assert.equals(neosnippet#parser#_get_completed_snippet({
|
||||
\ 'word' : 'something', 'abbr' : 'something(else)',
|
||||
\ 'menu' : '', 'info' : 'func()', 'snippet' : '(${1:custom})${2}'
|
||||
\ }, 'something', ''), '(${1:custom})${2}')
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user