diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-14 19:46:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-14 19:46:45 +0100 |
commit | 02b4d9b18a03549b68e364e428392b7a62766c74 (patch) | |
tree | e017eaa4d4531b7bccb612679b50848c94d9e5b3 /src/testdir/test_expr_utf8.vim | |
parent | 70ce8a1561c5396e4c4381f76a005cbb97646f80 (diff) | |
download | vim-git-02b4d9b18a03549b68e364e428392b7a62766c74.tar.gz |
patch 8.2.2607: strcharpart() cannot include composing charactersv8.2.2607
Problem: strcharpart() cannot include composing characters.
Solution: Add the {skipcc} argument.
Diffstat (limited to 'src/testdir/test_expr_utf8.vim')
-rw-r--r-- | src/testdir/test_expr_utf8.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim index b5937b208..c6d2e4ed7 100644 --- a/src/testdir/test_expr_utf8.vim +++ b/src/testdir/test_expr_utf8.vim @@ -31,6 +31,14 @@ func Test_strcharpart() call assert_equal('a', strcharpart('àxb', 0, 1)) call assert_equal('̀', strcharpart('àxb', 1, 1)) call assert_equal('x', strcharpart('àxb', 2, 1)) + + + call assert_equal('a', strcharpart('àxb', 0, 1, 0)) + call assert_equal('à', strcharpart('àxb', 0, 1, 1)) + call assert_equal('x', strcharpart('àxb', 1, 1, 1)) + + call assert_fails("let v = strcharpart('abc', 0, 0, [])", 'E745:') + call assert_fails("let v = strcharpart('abc', 0, 0, 2)", 'E1023:') endfunc " vim: shiftwidth=2 sts=2 expandtab |