comparison src/testdir/test_vim9_func.vim @ 27738:d754ac2f5ac5 v8.2.4395

patch 8.2.4395: some code lines not covered by tests Commit: https://github.com/vim/vim/commit/8b716f5f2204f938769de283d43bcb2f77d403e7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 15 21:17:56 2022 +0000 patch 8.2.4395: some code lines not covered by tests Problem: Some code lines not covered by tests. Solution: Add a few more test cases. Fix getting more than one error for invalid assignment.
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Feb 2022 22:30:04 +0100
parents 5c4ab8d4472c
children 2bd27d5ffbef
comparison
equal deleted inserted replaced
27737:9e05a238b0f0 27738:d754ac2f5ac5
3760 defcompile 3760 defcompile
3761 END 3761 END
3762 v9.CheckScriptFailure(lines, 'E476:') 3762 v9.CheckScriptFailure(lines, 'E476:')
3763 enddef 3763 enddef
3764 3764
3765 " The following messes up syntax highlight, keep near the end.
3765 if has('python3') 3766 if has('python3')
3767 def Test_python3_command()
3768 py3 import vim
3769 py3 vim.command("let g:done = 'yes'")
3770 assert_equal('yes', g:done)
3771 unlet g:done
3772 enddef
3773
3766 def Test_python3_heredoc() 3774 def Test_python3_heredoc()
3767 py3 << trim EOF 3775 py3 << trim EOF
3768 import vim 3776 import vim
3769 vim.vars['didit'] = 'yes' 3777 vim.vars['didit'] = 'yes'
3770 EOF 3778 EOF
3776 EOF 3784 EOF
3777 assert_equal('again', g:didit) 3785 assert_equal('again', g:didit)
3778 enddef 3786 enddef
3779 endif 3787 endif
3780 3788
3781 " This messes up syntax highlight, keep near the end.
3782 if has('lua') 3789 if has('lua')
3783 def Test_lua_heredoc() 3790 def Test_lua_heredoc()
3784 g:d = {} 3791 g:d = {}
3785 lua << trim EOF 3792 lua << trim EOF
3786 x = vim.eval('g:d') 3793 x = vim.eval('g:d')