comparison src/testdir/test_vim9_cmd.vim @ 25680:8556ded8a462 v8.2.3376

patch 8.2.3376: Vim9: no warning that "@r" does not do anything Commit: https://github.com/vim/vim/commit/4799cef85ce43e26f5022290b41a7c85bbab8cad Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 25 22:37:36 2021 +0200 patch 8.2.3376: Vim9: no warning that "@r" does not do anything Problem: Vim9: no warning that "@r" does not do anything. Solution: Give a "no effect" error. (closes https://github.com/vim/vim/issues/8779)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Aug 2021 22:45:04 +0200
parents 812c75fd255c
children 377a7686a52f
comparison
equal deleted inserted replaced
25679:b633748f3acb 25680:8556ded8a462
535 bwipe! 535 bwipe!
536 END 536 END
537 CheckDefAndScriptSuccess(lines) 537 CheckDefAndScriptSuccess(lines)
538 enddef 538 enddef
539 539
540 def Test_register_use_linebreak() 540 def Test_use_register()
541 var lines =<< trim END 541 var lines =<< trim END
542 new 542 new
543 @a = 'one' 543 @a = 'one'
544 @a->setline(1) 544 @a->setline(1)
545 @b = 'two' 545 @b = 'two'
549 ->setline(3) 549 ->setline(3)
550 assert_equal(['one', 'two', 'three'], getline(1, '$')) 550 assert_equal(['one', 'two', 'three'], getline(1, '$'))
551 bwipe! 551 bwipe!
552 END 552 END
553 CheckDefAndScriptSuccess(lines) 553 CheckDefAndScriptSuccess(lines)
554
555 lines =<< trim END
556 @a = 'echo "text"'
557 @a
558 END
559 CheckDefAndScriptFailure(lines, 'E1207:')
554 enddef 560 enddef
555 561
556 def Test_environment_use_linebreak() 562 def Test_environment_use_linebreak()
557 var lines =<< trim END 563 var lines =<< trim END
558 new 564 new