summaryrefslogtreecommitdiff
path: root/src/testdir/test_expr.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-03-03 15:06:52 +0100
committerBram Moolenaar <Bram@vim.org>2018-03-03 15:06:52 +0100
commitc71807db9c1821baf86796cd76952df36ff1a29a (patch)
treeda3e80c8b182e69e254044783949078388676161 /src/testdir/test_expr.vim
parent590ec878a52b3b3d4453475f1eb4899f2b37969f (diff)
downloadvim-git-c71807db9c1821baf86796cd76952df36ff1a29a.tar.gz
patch 8.0.1557: printf() does not work with only one argumentv8.0.1557
Problem: printf() does not work with only one argument. (Daniel Hahler) Solution: Allow using just the format. (Ken Takata, closes #2687)
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r--src/testdir/test_expr.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index c47bc228b..c14b6e671 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -131,6 +131,9 @@ func Test_option_value()
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))