aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_method.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-30 13:38:13 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-31 10:49:57 +0800
commit619cb143f93fbf75adde9710415a74d36c8eb63d (patch)
tree9596ca94c741f694adda53e95bb2ec98a3ca8566 /test/old/testdir/test_method.vim
parenta1561cbbea55cc74d4dc880585f942f4a114c4b8 (diff)
downloadrneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.tar.gz
rneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.tar.bz2
rneovim-619cb143f93fbf75adde9710415a74d36c8eb63d.zip
vim-patch:9.1.0415: Some functions are not tested
Problem: Some functions are not tested Solution: Add a few more tests, fix a few minor problems (Yegappan Lakshmanan) closes: vim/vim#14789 https://github.com/vim/vim/commit/fe424d13ef6e5486923f23f15bb6951e3079412e Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test/old/testdir/test_method.vim')
-rw-r--r--test/old/testdir/test_method.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/old/testdir/test_method.vim b/test/old/testdir/test_method.vim
index 1b57bba282..ca1ca7d573 100644
--- a/test/old/testdir/test_method.vim
+++ b/test/old/testdir/test_method.vim
@@ -134,6 +134,13 @@ func Test_method_syntax()
call assert_fails('eval [1, 2, 3]-> sort()', 'E15:')
call assert_fails('eval [1, 2, 3]->sort ()', 'E274:')
call assert_fails('eval [1, 2, 3]-> sort ()', 'E15:')
+
+ " Test for using a method name containing a curly brace name
+ let s = 'len'
+ call assert_equal(4, "xxxx"->str{s}())
+
+ " Test for using a method in an interpolated string
+ call assert_equal('4', $'{"xxxx"->strlen()}')
endfunc
func Test_method_lambda()