0
0
mirror of https://github.com/vim/vim.git synced 2025-10-12 06:44:06 -04:00

patch 8.1.1915: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
This commit is contained in:
Bram Moolenaar
2019-08-23 22:31:37 +02:00
parent d019039ccd
commit 1a3a89168d
12 changed files with 84 additions and 31 deletions

View File

@@ -8,6 +8,7 @@ func Test_list_method()
eval l->assert_notequal([3, 2, 1])
eval l->assert_notequal([3, 2, 1], 'wrong')
call assert_equal(l, l->copy())
call assert_equal(l, l->deepcopy())
call assert_equal(1, l->count(2))
call assert_false(l->empty())
call assert_true([]->empty())
@@ -38,6 +39,7 @@ func Test_dict_method()
let d = #{one: 1, two: 2, three: 3}
call assert_equal(d, d->copy())
call assert_equal(d, d->deepcopy())
call assert_equal(1, d->count(2))
call assert_false(d->empty())
call assert_true({}->empty())