Mercurial > vim
comparison src/testdir/test_lambda.vim @ 23108:34a74f5f0fb4 v8.2.2100
patch 8.2.2100: insufficient testing for function range and dict
Commit: https://github.com/vim/vim/commit/67322bf74a106b6476b093e75da87d61e2181b76
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 6 15:03:19 2020 +0100
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 https://github.com/vim/vim/issues/7428)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Dec 2020 15:15:04 +0100 |
parents | ff21e2962490 |
children | 12fd67997953 |
comparison
equal
deleted
inserted
replaced
23107:6daa688e0e24 | 23108:34a74f5f0fb4 |
---|---|
245 call test_garbagecollect_now() | 245 call test_garbagecollect_now() |
246 call assert_equal(1, l:F()) | 246 call assert_equal(1, l:F()) |
247 call assert_equal(2, l:F()) | 247 call assert_equal(2, l:F()) |
248 call assert_equal(3, l:F()) | 248 call assert_equal(3, l:F()) |
249 call assert_equal(4, l:F()) | 249 call assert_equal(4, l:F()) |
250 | |
251 call assert_match("^\n function <SNR>\\d\\+_bar() closure" | |
252 \ .. "\n1 let x += 1" | |
253 \ .. "\n2 return x" | |
254 \ .. "\n endfunction$", execute('func s:bar')) | |
250 endfunc | 255 endfunc |
251 | 256 |
252 func Test_closure_unlet() | 257 func Test_closure_unlet() |
253 func! s:foo() | 258 func! s:foo() |
254 let x = 1 | 259 let x = 1 |