From 245e6c5b305a0f32c39c88df8c0bf3c38505cc60 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Oct 2022 08:25:28 +0800 Subject: test(old): test_lambda.vim garbagecollect() -> test_garbagecollect_now() --- src/nvim/testdir/test_lambda.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nvim/testdir/test_lambda.vim') diff --git a/src/nvim/testdir/test_lambda.vim b/src/nvim/testdir/test_lambda.vim index 997c3dcd3a..3c12c7b02e 100644 --- a/src/nvim/testdir/test_lambda.vim +++ b/src/nvim/testdir/test_lambda.vim @@ -126,7 +126,7 @@ func Test_lambda_closure_counter() endfunc let l:F = s:foo() - call garbagecollect() + call test_garbagecollect_now() call assert_equal(1, l:F()) call assert_equal(2, l:F()) call assert_equal(3, l:F()) @@ -209,9 +209,9 @@ func Test_lambda_circular_reference() endfunc call s:Foo() - call garbagecollect() + call test_garbagecollect_now() let i = 0 | while i < 10000 | call s:Foo() | let i+= 1 | endwhile - call garbagecollect() + call test_garbagecollect_now() endfunc func Test_lambda_combination() @@ -240,7 +240,7 @@ func Test_closure_counter() endfunc let l:F = s:foo() - call garbagecollect() + call test_garbagecollect_now() call assert_equal(1, l:F()) call assert_equal(2, l:F()) call assert_equal(3, l:F()) @@ -258,7 +258,7 @@ func Test_closure_unlet() endfunc call assert_false(has_key(s:foo(), 'x')) - call garbagecollect() + call test_garbagecollect_now() endfunc func LambdaFoo() @@ -295,7 +295,7 @@ func Test_named_function_closure() endfunc call Afoo() call assert_equal(14, s:Abar()) - call garbagecollect() + call test_garbagecollect_now() call assert_equal(14, s:Abar()) endfunc -- cgit From bd122494cc3012a4885a55663e7c158c7a402878 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Oct 2022 08:26:09 +0800 Subject: vim-patch:8.2.2100: insufficient testing for function range and dict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Insufficient testing for function range and dict. Solution: Add a few tests. (Dominique Pellé, closes vim/vim#7428) https://github.com/vim/vim/commit/67322bf74a106b6476b093e75da87d61e2181b76 --- src/nvim/testdir/test_lambda.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir/test_lambda.vim') diff --git a/src/nvim/testdir/test_lambda.vim b/src/nvim/testdir/test_lambda.vim index 3c12c7b02e..ce15243993 100644 --- a/src/nvim/testdir/test_lambda.vim +++ b/src/nvim/testdir/test_lambda.vim @@ -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 \\d\\+_bar() closure" + \ .. "\n1 let x += 1" + \ .. "\n2 return x" + \ .. "\n endfunction$", execute('func s:bar')) endfunc func Test_closure_unlet() -- cgit