aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-11 07:39:10 +0800
committerGitHub <noreply@github.com>2024-04-11 07:39:10 +0800
commitf504e799a3f62e485b09fe8ab9470a991f43e7f5 (patch)
treef342b0eb64983ae20779b73ef18e9838ac5ba8b8 /test
parent85099e989bbd8595afdb19937a8a00efdeb34a31 (diff)
downloadrneovim-f504e799a3f62e485b09fe8ab9470a991f43e7f5.tar.gz
rneovim-f504e799a3f62e485b09fe8ab9470a991f43e7f5.tar.bz2
rneovim-f504e799a3f62e485b09fe8ab9470a991f43e7f5.zip
vim-patch:9.1.0301: Vim9: heredoc start may be recognized in string (#28266)
Problem: Vim9: heredoc start may be recognized in string. Solution: Don't skip to closing bracket for invalid list assignment. (zeertzjq) closes: vim/vim#14472 https://github.com/vim/vim/commit/1817ccdb107ceeaf5c48fe193da5146682c15ca6
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_let.vim15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/old/testdir/test_let.vim b/test/old/testdir/test_let.vim
index d93d33b199..655c177385 100644
--- a/test/old/testdir/test_let.vim
+++ b/test/old/testdir/test_let.vim
@@ -410,10 +410,16 @@ func Test_let_heredoc_fails()
endtry
try
+ let [] =<< trim TEXT
+ TEXT
+ call assert_report('No exception thrown')
+ catch /E475:/
+ catch
+ call assert_report('Caught exception: ' .. v:exception)
+ endtry
+
+ try
let [a b c] =<< trim TEXT
- change
- insert
- append
TEXT
call assert_report('No exception thrown')
catch /E475:/
@@ -423,9 +429,6 @@ func Test_let_heredoc_fails()
try
let [a; b; c] =<< trim TEXT
- change
- insert
- append
TEXT
call assert_report('No exception thrown')
catch /E452:/