diff options
Diffstat (limited to 'src/testdir/test_expr_utf8.vim')
-rw-r--r-- | src/testdir/test_expr_utf8.vim | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/testdir/test_expr_utf8.vim b/src/testdir/test_expr_utf8.vim index 8b10e6300..ec36deca9 100644 --- a/src/testdir/test_expr_utf8.vim +++ b/src/testdir/test_expr_utf8.vim @@ -6,13 +6,12 @@ set encoding=utf-8 scriptencoding utf-8 func Test_strgetchar() - call assert_equal(char2nr('a'), strgetchar('axb', 0)) - call assert_equal(char2nr('x'), strgetchar('axb', 1)) - call assert_equal(char2nr('b'), strgetchar('axb', 2)) + call assert_equal(char2nr('á'), strgetchar('áxb', 0)) + call assert_equal(char2nr('x'), strgetchar('áxb', 1)) - call assert_equal(-1, strgetchar('axb', -1)) - call assert_equal(-1, strgetchar('axb', 3)) - call assert_equal(-1, strgetchar('', 0)) + call assert_equal(char2nr('a'), strgetchar('àxb', 0)) + call assert_equal(char2nr('̀'), strgetchar('àxb', 1)) + call assert_equal(char2nr('x'), strgetchar('àxb', 2)) endfunc func Test_strcharpart() |