mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.1557: printf() does not work with only one argument (#9038)
Problem: printf() does not work with only one argument. (Daniel Hahler)
Solution: Allow using just the format. (Ken Takata, closes vim/vim#2687)
c71807db9c
This commit is contained in:
parent
9183e2c67e
commit
d3c90cbbb4
@ -222,7 +222,7 @@ return {
|
||||
pathshorten={args=1},
|
||||
pow={args=2},
|
||||
prevnonblank={args=1},
|
||||
printf={args=varargs(2)},
|
||||
printf={args=varargs(1)},
|
||||
pumvisible={},
|
||||
py3eval={args=1},
|
||||
pyeval={args=1},
|
||||
|
@ -166,6 +166,9 @@ function Test_printf_spec_s()
|
||||
endfunc
|
||||
|
||||
function Test_printf_misc()
|
||||
call assert_equal('123', printf('123'))
|
||||
call assert_fails("call printf('123', 3)", "E767:")
|
||||
|
||||
call assert_equal('123', printf('%d', 123))
|
||||
call assert_equal('123', printf('%i', 123))
|
||||
call assert_equal('123', printf('%D', 123))
|
||||
|
Loading…
Reference in New Issue
Block a user