diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-12 21:58:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-12 21:58:40 +0800 |
commit | a7e5d4238a00d5bfa5809b2860047eca2d565e62 (patch) | |
tree | 4ac76f0f588aba144d762e76c0cd6bd2ba9f1a78 /test | |
parent | 564d2d20a3734a00ddd3e8ea92ba0bc53e9558ff (diff) | |
download | rneovim-a7e5d4238a00d5bfa5809b2860047eca2d565e62.tar.gz rneovim-a7e5d4238a00d5bfa5809b2860047eca2d565e62.tar.bz2 rneovim-a7e5d4238a00d5bfa5809b2860047eca2d565e62.zip |
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 <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listdict.vim | 8 |
1 files changed, 6 insertions, 2 deletions
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 |