aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-12 21:58:40 +0800
committerGitHub <noreply@github.com>2023-06-12 21:58:40 +0800
commita7e5d4238a00d5bfa5809b2860047eca2d565e62 (patch)
tree4ac76f0f588aba144d762e76c0cd6bd2ba9f1a78 /test
parent564d2d20a3734a00ddd3e8ea92ba0bc53e9558ff (diff)
downloadrneovim-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.vim8
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