summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-23 17:34:46 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-23 17:34:46 +0200
commit6c53fca02301ff871cddc1c74c388e23e53a424a (patch)
treea4cec7dd695a51465d06922b5c18a30d6b45509b /src/testdir
parent430deb1945cbc7a17ed42c5c737fc08d2eef327a (diff)
downloadvim-git-6c53fca02301ff871cddc1c74c388e23e53a424a.tar.gz
patch 8.2.1517: cannot easily get the character under the cursorv8.2.1517
Problem: Cannot easily get the character under the cursor. Solution: Add the {chars} argument to strpart().
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_functions.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index dc06bd72e..e15199b78 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -513,6 +513,10 @@ func Test_strpart()
call assert_equal('lép', strpart('éléphant', 2, 4))
call assert_equal('léphant', strpart('éléphant', 2))
+
+ call assert_equal('é', strpart('éléphant', 0, 1, 1))
+ call assert_equal('ép', strpart('éléphant', 3, 2, v:true))
+ call assert_equal('ó', strpart('cómposed', 1, 1, 1))
endfunc
func Test_tolower()