From a7e5d4238a00d5bfa5809b2860047eca2d565e62 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 12 Jun 2023 21:58:40 +0800 Subject: vim-patch:8.2.4600: Vim9: not enough test coverage for executing :def function (#24001) Problem: Vim9: not enough test coverage for executing :def function. Solution: Add a few more tests. Fix inconsistencies. https://github.com/vim/vim/commit/6b8c7ba062ca4b50e8f983e0485be7afa4eef691 Cherry-pick a blank line in test_listdict.vim from patch 8.2.3842. Co-authored-by: Bram Moolenaar --- test/old/testdir/test_listdict.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index 1fc0c1e7d4..a33725cf5c 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -666,10 +666,14 @@ func Test_list_locked_var_unlet() call assert_equal(expected[depth][u][1], ps) endfor endfor - " Deleting a list range should fail if the range is locked + + " Deleting a list range with locked items works, but changing the items + " fails. let l = [1, 2, 3, 4] lockvar l[1:2] - call assert_fails('unlet l[1:2]', 'E741:') + call assert_fails('let l[1:2] = [8, 9]', 'E741:') + unlet l[1:2] + call assert_equal([1, 4], l) unlet l endfunc -- cgit