1
0
forked from aniani/vim

patch 8.1.1952: more functions can be used as a method

Problem:    More functions can be used as a method.
Solution:   Allow more functions to be used as a method.
This commit is contained in:
Bram Moolenaar
2019-08-31 19:13:58 +02:00
parent f1699968ba
commit 5d69fdb7c4
9 changed files with 44 additions and 17 deletions

View File

@@ -12,8 +12,8 @@ func Test_var()
let def_str = "Chance"
call assert_equal('Dance', getwinvar(1, 'var_str'))
call assert_equal('Dance', getwinvar(1, 'var_str', def_str))
call assert_equal({'var_str': 'Dance'}, getwinvar(1, ''))
call assert_equal({'var_str': 'Dance'}, getwinvar(1, '', def_str))
call assert_equal({'var_str': 'Dance'}, 1->getwinvar(''))
call assert_equal({'var_str': 'Dance'}, 1->getwinvar('', def_str))
unlet w:var_str
call assert_equal('Chance', getwinvar(1, 'var_str', def_str))
call assert_equal({}, getwinvar(1, ''))