Mercurial > vim
comparison src/testdir/test_utf8.vim @ 18017:988e5a868b60 v8.1.2004
patch 8.1.2004: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 7 19:05:09 2019 +0200
patch 8.1.2004: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Sep 2019 19:15:04 +0200 |
parents | 0dcc2ee838dd |
children | 546bdeef35f1 |
comparison
equal
deleted
inserted
replaced
18016:834b7854aa3c | 18017:988e5a868b60 |
---|---|
15 func Test_strchars() | 15 func Test_strchars() |
16 let inp = ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"] | 16 let inp = ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"] |
17 let exp = [[1, 1, 1], [3, 3, 3], [2, 2, 1], [3, 3, 1], [1, 1, 1]] | 17 let exp = [[1, 1, 1], [3, 3, 3], [2, 2, 1], [3, 3, 1], [1, 1, 1]] |
18 for i in range(len(inp)) | 18 for i in range(len(inp)) |
19 call assert_equal(exp[i][0], strchars(inp[i])) | 19 call assert_equal(exp[i][0], strchars(inp[i])) |
20 call assert_equal(exp[i][1], strchars(inp[i], 0)) | 20 call assert_equal(exp[i][1], inp[i]->strchars(0)) |
21 call assert_equal(exp[i][2], strchars(inp[i], 1)) | 21 call assert_equal(exp[i][2], strchars(inp[i], 1)) |
22 endfor | 22 endfor |
23 endfunc | 23 endfunc |
24 | 24 |
25 " Test for customlist completion | 25 " Test for customlist completion |