diff src/testdir/test_let.vim @ 34868:443a527b43ed v9.1.0301

patch 9.1.0301: Vim9: heredoc start may be recognized in string Commit: https://github.com/vim/vim/commit/1817ccdb107ceeaf5c48fe193da5146682c15ca6 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Apr 10 17:37:47 2024 +0200 patch 9.1.0301: Vim9: heredoc start may be recognized in string Problem: Vim9: heredoc start may be recognized in string. Solution: Don't skip to closing bracket for invalid list assignment. (zeertzjq) closes: #14472 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 10 Apr 2024 17:45:04 +0200
parents 3b0c98b3a7b5
children d1b433ed9f07
line wrap: on
line diff
--- a/src/testdir/test_let.vim
+++ b/src/testdir/test_let.vim
@@ -409,10 +409,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:/
@@ -422,9 +428,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:/