aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_expr.vim
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-10-31 19:04:28 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2021-11-26 18:53:10 +0000
commit0f4510cb1a48c4c4d7b23a45f57d087329d4364d (patch)
tree5f0b7e0cd708807e451cee4dd39e21b177efea2b /src/nvim/testdir/test_expr.vim
parent2ee0bc09d9becd71ca864b4d754b63b152d1ce5b (diff)
downloadrneovim-0f4510cb1a48c4c4d7b23a45f57d087329d4364d.tar.gz
rneovim-0f4510cb1a48c4c4d7b23a45f57d087329d4364d.tar.bz2
rneovim-0f4510cb1a48c4c4d7b23a45f57d087329d4364d.zip
feat(eval/method): partially port v8.1.2004
Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9 +sound is needed for sound_* functions. Make swapinfo and swapname take exactly one argument. Previously, they could erroneously take one or more.
Diffstat (limited to 'src/nvim/testdir/test_expr.vim')
-rw-r--r--src/nvim/testdir/test_expr.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index a8cf6577f6..1d7fd3e385 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -56,7 +56,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))
@@ -66,7 +66,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))