Do not use dynamic key in dict
This commit is contained in:
parent
7ab9ade52d
commit
5f604145b8
|
@ -86,14 +86,18 @@ Execute (Test Plug command):
|
||||||
Execute (Plug command with dictionary option):
|
Execute (Plug command with dictionary option):
|
||||||
Log string(g:plugs)
|
Log string(g:plugs)
|
||||||
for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as']
|
for opt in ['branch', 'tag', 'commit', 'rtp', 'dir', 'as']
|
||||||
|
let opts = {}
|
||||||
|
let opts[opt] = ''
|
||||||
redir => out
|
redir => out
|
||||||
silent Plug 'foo/bar.vim', {opt: ''}
|
silent Plug 'foo/bar.vim', opts
|
||||||
redir END
|
redir END
|
||||||
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string)'
|
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string)'
|
||||||
endfor
|
endfor
|
||||||
for opt in ['on', 'for']
|
for opt in ['on', 'for']
|
||||||
|
let opts = {}
|
||||||
|
let opts[opt] = ''
|
||||||
redir => out
|
redir => out
|
||||||
silent Plug 'foo/bar.vim', {opt: ''}
|
silent Plug 'foo/bar.vim', opts
|
||||||
redir END
|
redir END
|
||||||
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string or list)'
|
Assert out =~ 'Invalid argument for "'.opt.'" option of :Plug (expected: string or list)'
|
||||||
endfor
|
endfor
|
||||||
|
|
Loading…
Reference in New Issue
Block a user