diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-12 20:35:01 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-06-12 21:05:22 +0800 |
commit | aa92a04beeed1fb10a82edd6a245e5783cd771c1 (patch) | |
tree | cf114cfd7c4c0c9953509191ecce81b322752642 /test | |
parent | 0eb02ea90a5a7c2e35bfcf99b701a28ff2901b4b (diff) | |
download | rneovim-aa92a04beeed1fb10a82edd6a245e5783cd771c1.tar.gz rneovim-aa92a04beeed1fb10a82edd6a245e5783cd771c1.tar.bz2 rneovim-aa92a04beeed1fb10a82edd6a245e5783cd771c1.zip |
vim-patch:8.2.3332: Vim9: cannot assign to range in list
Problem: Vim9: cannot assign to range in list.
Solution: Implement overwriting a list range.
https://github.com/vim/vim/commit/4f0884d6e24d1d45ec83fd86b372b403177d3298
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listdict.vim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index 07a365d337..d31d17f81a 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -178,11 +178,14 @@ endfunc " test for range assign func Test_list_range_assign() - let l = [0] - let l[:] = [1, 2] - call assert_equal([1, 2], l) - let l[-4:-1] = [5, 6] - call assert_equal([5, 6], l) + let lines =<< trim END + VAR l = [0] + LET l[:] = [1, 2] + call assert_equal([1, 2], l) + LET l[-4 : -1] = [5, 6] + call assert_equal([5, 6], l) + END + call CheckLegacyAndVim9Success(lines) endfunc " Test removing items in list |