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:
@@ -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())
|
||||
|
Reference in New Issue
Block a user