aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-06 05:03:24 +0900
committerwatiko <service@mail.watiko.net>2016-02-06 05:54:15 +0900
commit70ab19822184b5ffb630e238f10a6a45121bb15c (patch)
tree66dc209d72487fbb09b7b5ad7a8b69c2c5d3571e /src/nvim/testdir
parentfef753fa6d03e85863f8ba76ea3f787c740d089d (diff)
downloadrneovim-70ab19822184b5ffb630e238f10a6a45121bb15c.tar.gz
rneovim-70ab19822184b5ffb630e238f10a6a45121bb15c.tar.bz2
rneovim-70ab19822184b5ffb630e238f10a6a45121bb15c.zip
vim-patch:7.4.717
Problem: ":let list += list" can change a locked list. Solution: Check for the lock earlier. (Olaf Dabrunz) https://github.com/vim/vim/commit/1cd5e613b0d8947d52762af0e17351d5e49869de
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test55.in11
-rw-r--r--src/nvim/testdir/test55.ok3
2 files changed, 14 insertions, 0 deletions
diff --git a/src/nvim/testdir/test55.in b/src/nvim/testdir/test55.in
index 7b6f684caa..9e3c1168cc 100644
--- a/src/nvim/testdir/test55.in
+++ b/src/nvim/testdir/test55.in
@@ -442,6 +442,17 @@ let l = [0, 1, 2, 3]
:unlockvar 1 b:
:unlet! b:testvar
:"
+:$put ='No :let += of locked list variable:'
+:let l = ['a', 'b', 3]
+:lockvar 1 l
+:try
+: let l += ['x']
+: $put ='did :let +='
+:catch
+: $put =v:exception[:14]
+:endtry
+:$put =string(l)
+:"
:unlet l
:let l = [1, 2, 3, 4]
:lockvar! l
diff --git a/src/nvim/testdir/test55.ok b/src/nvim/testdir/test55.ok
index 4e0303c26e..607a95ead9 100644
--- a/src/nvim/testdir/test55.ok
+++ b/src/nvim/testdir/test55.ok
@@ -144,6 +144,9 @@ No extend() of write-protected scope-level variable:
Vim(put):E742:
No :unlet of variable in locked scope:
Vim(unlet):E741:
+No :let += of locked list variable:
+Vim(let):E741:
+['a', 'b', 3]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]