Mercurial > vim
diff src/testdir/test_expr.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 | 7a19c8d6bb9e |
children | dfe9db84e326 |
line wrap: on
line diff
--- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -53,7 +53,7 @@ endfunc func Test_strgetchar() call assert_equal(char2nr('a'), strgetchar('axb', 0)) - call assert_equal(char2nr('x'), strgetchar('axb', 1)) + call assert_equal(char2nr('x'), 'axb'->strgetchar(1)) call assert_equal(char2nr('b'), strgetchar('axb', 2)) call assert_equal(-1, strgetchar('axb', -1)) @@ -63,7 +63,7 @@ endfunc func Test_strcharpart() call assert_equal('a', strcharpart('axb', 0, 1)) - call assert_equal('x', strcharpart('axb', 1, 1)) + call assert_equal('x', 'axb'->strcharpart(1, 1)) call assert_equal('b', strcharpart('axb', 2, 1)) call assert_equal('xb', strcharpart('axb', 1))