Mercurial > vim
diff src/testdir/test_utf8.vim @ 19783:546bdeef35f1 v8.2.0448
patch 8.2.0448: various functions not properly tested
Commit: https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 25 22:23:46 2020 +0100
patch 8.2.0448: various functions not properly tested
Problem: Various functions not properly tested.
Solution: Add more tests, especially for failures. (Yegappan Lakshmanan,
closes #5843)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Mar 2020 22:30:04 +0100 |
parents | 988e5a868b60 |
children | e82996ad131f |
line wrap: on
line diff
--- a/src/testdir/test_utf8.vim +++ b/src/testdir/test_utf8.vim @@ -20,6 +20,8 @@ func Test_strchars() call assert_equal(exp[i][1], inp[i]->strchars(0)) call assert_equal(exp[i][2], strchars(inp[i], 1)) endfor + call assert_fails("let v=strchars('abc', [])", 'E474:') + call assert_fails("let v=strchars('abc', 2)", 'E474:') endfunc " Test for customlist completion @@ -99,6 +101,7 @@ func Test_list2str_str2list_latin1() let lres = str2list(s, 1) let sres = list2str(l, 1) + call assert_equal([65, 66, 67], str2list("ABC")) let &encoding = save_encoding call assert_equal(l, lres) @@ -138,3 +141,5 @@ func Test_screenchar_utf8() bwipe! endfunc + +" vim: shiftwidth=2 sts=2 expandtab