diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-23 17:34:46 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-23 17:34:46 +0200 |
commit | 6c53fca02301ff871cddc1c74c388e23e53a424a (patch) | |
tree | a4cec7dd695a51465d06922b5c18a30d6b45509b /src/testdir | |
parent | 430deb1945cbc7a17ed42c5c737fc08d2eef327a (diff) | |
download | vim-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.vim | 4 |
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() |