aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-04 18:29:18 +0800
committerGitHub <noreply@github.com>2023-05-04 18:29:18 +0800
commit7ae57435be1af17cfb053087e08c6ba313522990 (patch)
treeb198a34d1a29f25bb8d2f207f857be06a7838d8d /test
parent38f9ee63660740ce1976173a8513b57bc41d94a3 (diff)
parent8752da89b83281426e81e5c4a392308848f4bfb6 (diff)
downloadrneovim-7ae57435be1af17cfb053087e08c6ba313522990.tar.gz
rneovim-7ae57435be1af17cfb053087e08c6ba313522990.tar.bz2
rneovim-7ae57435be1af17cfb053087e08c6ba313522990.zip
Merge pull request #23470 from zeertzjq/vim-8.2.2344
vim-patch:8.2.{1461,1462,1466,2344,2607,2756}
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_expr_utf8.vim10
-rw-r--r--test/old/testdir/test_visual.vim2
2 files changed, 11 insertions, 1 deletions
diff --git a/test/old/testdir/test_expr_utf8.vim b/test/old/testdir/test_expr_utf8.vim
index fad725d2e5..c6d2e4ed7e 100644
--- a/test/old/testdir/test_expr_utf8.vim
+++ b/test/old/testdir/test_expr_utf8.vim
@@ -31,4 +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
diff --git a/test/old/testdir/test_visual.vim b/test/old/testdir/test_visual.vim
index d10a946200..04282416bb 100644
--- a/test/old/testdir/test_visual.vim
+++ b/test/old/testdir/test_visual.vim
@@ -935,7 +935,7 @@ func Test_visual_block_mode()
endfunc
func Test_visual_force_motion_feedkeys()
- onoremap <expr> i- execute('let g:mode = mode(1)')
+ onoremap <expr> i- execute('let g:mode = mode(1)')->slice(0, 0)
call feedkeys('dvi-', 'x')
call assert_equal('nov', g:mode)
call feedkeys('di-', 'x')