summaryrefslogtreecommitdiff
path: root/src/testdir/test_listdict.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-20 17:46:06 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-20 17:46:06 +0000
commit6b8c7ba062ca4b50e8f983e0485be7afa4eef691 (patch)
tree3785ea7cbfd478401baa1542acd8211876a1248b /src/testdir/test_listdict.vim
parenta4df834a92535cf124afd1c3b711b4a7109e3534 (diff)
downloadvim-git-6b8c7ba062ca4b50e8f983e0485be7afa4eef691.tar.gz
patch 8.2.4600: Vim9: not enough test coverage for executing :def functionv8.2.4600
Problem: Vim9: not enough test coverage for executing :def function. Solution: Add a few more tests. Fix inconsistencies.
Diffstat (limited to 'src/testdir/test_listdict.vim')
-rw-r--r--src/testdir/test_listdict.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index 89b7f041a..38eb338bf 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -721,10 +721,13 @@ func Test_list_locked_var_unlet()
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