aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-09-28 00:32:22 +0200
committerGitHub <noreply@github.com>2019-09-28 00:32:22 +0200
commit0d9a3c86a1c7143187398e6cb6005ed06a5e2fde (patch)
treec11a233f496ec926630f63e074c4e94a9e39306e /src/nvim/testdir
parentfe9d54f418973f59ec88ca05489da6df3609811f (diff)
downloadrneovim-0d9a3c86a1c7143187398e6cb6005ed06a5e2fde.tar.gz
rneovim-0d9a3c86a1c7143187398e6cb6005ed06a5e2fde.tar.bz2
rneovim-0d9a3c86a1c7143187398e6cb6005ed06a5e2fde.zip
vim-patch:8.1.2083: multi-byte chars do not work properly with "%.*S" in printf() (#11106)
Problem: Multi-byte chars do not work properly with "%.*S" in printf(). Solution: Use mb_ptr2cells(). Daniel Hahler, closes vim/vim#4989) https://github.com/vim/vim/commit/ce0fac28977af31f1dec411d3535b4de2c3169b3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_expr.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 4f99625e73..dd546dbf71 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -279,6 +279,9 @@ function Test_printf_misc()
call assert_equal('abc ', printf('%-4s', 'abc'))
call assert_equal('abc ', printf('%-4S', 'abc'))
+ call assert_equal('🐍', printf('%.2S', '🐍🐍'))
+ call assert_equal('', printf('%.1S', '🐍🐍'))
+
call assert_equal('1%', printf('%d%%', 1))
endfunc