comparison 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
comparison
equal deleted inserted replaced
34867:4f621f4ba4f7 34868:443a527b43ed
407 catch 407 catch
408 call assert_report('Caught exception: ' .. v:exception) 408 call assert_report('Caught exception: ' .. v:exception)
409 endtry 409 endtry
410 410
411 try 411 try
412 let [a b c] =<< trim TEXT 412 let [] =<< trim TEXT
413 change
414 insert
415 append
416 TEXT 413 TEXT
417 call assert_report('No exception thrown') 414 call assert_report('No exception thrown')
418 catch /E475:/ 415 catch /E475:/
419 catch 416 catch
420 call assert_report('Caught exception: ' .. v:exception) 417 call assert_report('Caught exception: ' .. v:exception)
421 endtry 418 endtry
422 419
423 try 420 try
421 let [a b c] =<< trim TEXT
422 TEXT
423 call assert_report('No exception thrown')
424 catch /E475:/
425 catch
426 call assert_report('Caught exception: ' .. v:exception)
427 endtry
428
429 try
424 let [a; b; c] =<< trim TEXT 430 let [a; b; c] =<< trim TEXT
425 change
426 insert
427 append
428 TEXT 431 TEXT
429 call assert_report('No exception thrown') 432 call assert_report('No exception thrown')
430 catch /E452:/ 433 catch /E452:/
431 catch 434 catch
432 call assert_report('Caught exception: ' .. v:exception) 435 call assert_report('Caught exception: ' .. v:exception)