comparison src/testdir/test_vim9_cmd.vim @ 25670:812c75fd255c v8.2.3371

patch 8.2.3371: Vim9: :$ENV cannot be followed by ->func() in next line Commit: https://github.com/vim/vim/commit/5ca5cc6412d7d68fd380926f9551a8b7ba335199 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 24 21:56:03 2021 +0200 patch 8.2.3371: Vim9: :$ENV cannot be followed by ->func() in next line Problem: Vim9: :$ENV cannot be followed by ->func() in next line. Solution: Use "$ENV" as the start of an expression. (closes https://github.com/vim/vim/issues/8790)
author Bram Moolenaar <Bram@vim.org>
date Tue, 24 Aug 2021 22:00:06 +0200
parents 23f065f27d2e
children 8556ded8a462
comparison
equal deleted inserted replaced
25669:87f9053e504c 25670:812c75fd255c
544 @a->setline(1) 544 @a->setline(1)
545 @b = 'two' 545 @b = 'two'
546 @b ->setline(2) 546 @b ->setline(2)
547 @c = 'three' 547 @c = 'three'
548 @c 548 @c
549 ->setline(3)
550 assert_equal(['one', 'two', 'three'], getline(1, '$'))
551 bwipe!
552 END
553 CheckDefAndScriptSuccess(lines)
554 enddef
555
556 def Test_environment_use_linebreak()
557 var lines =<< trim END
558 new
559 $TESTENV = 'one'
560 $TESTENV->setline(1)
561 $TESTENV = 'two'
562 $TESTENV ->setline(2)
563 $TESTENV = 'three'
564 $TESTENV
549 ->setline(3) 565 ->setline(3)
550 assert_equal(['one', 'two', 'three'], getline(1, '$')) 566 assert_equal(['one', 'two', 'three'], getline(1, '$'))
551 bwipe! 567 bwipe!
552 END 568 END
553 CheckDefAndScriptSuccess(lines) 569 CheckDefAndScriptSuccess(lines)