vim-patch:8.2.2100: insufficient testing for function range and dict

Problem:    Insufficient testing for function range and dict.
Solution:   Add a few tests. (Dominique Pellé, closes vim/vim#7428)

67322bf74a
This commit is contained in:
zeertzjq
2022-10-27 08:26:09 +08:00
parent 245e6c5b30
commit bd122494cc
4 changed files with 39 additions and 2 deletions

View File

@@ -245,6 +245,11 @@ func Test_closure_counter()
call assert_equal(2, l:F())
call assert_equal(3, l:F())
call assert_equal(4, l:F())
call assert_match("^\n function <SNR>\\d\\+_bar() closure"
\ .. "\n1 let x += 1"
\ .. "\n2 return x"
\ .. "\n endfunction$", execute('func s:bar'))
endfunc
func Test_closure_unlet()