summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_listdict.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-11 21:49:23 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-11 21:49:23 +0200
commit4f0884d6e24d1d45ec83fd86b372b403177d3298 (patch)
treed1c02be5dcd31c3f12ba720fcd715f5d223012e6 /src/testdir/test_listdict.vim
parented7cb2df35244e40e5c4df06169b50e705427576 (diff)
patch 8.2.3332: Vim9: cannot assign to range in listv8.2.3332
Problem: Vim9: cannot assign to range in list. Solution: Implement overwriting a list range.
Diffstat (limited to 'src/testdir/test_listdict.vim')
-rw-r--r--src/testdir/test_listdict.vim13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index 90f5679c99..1e7c8125c2 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -164,11 +164,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