Patch 8.2.0994
Problem: Vim9: missing function causes compilation error.
Solution: Call test function indirectly.
Files: src/testdir/test_vim9_script.vim
*** ../vim-8.2.0993/src/testdir/test_vim9_script.vim 2020-06-17
12:04:50.433837356 +0200
--- src/testdir/test_vim9_script.vim 2020-06-17 19:57:59.059239039 +0200
***************
*** 781,800 ****
func Test_import_fails_without_script()
CheckRunVimInTerminal
let export =<< trim END
vim9script
export def Foo(): number
return 0
enddef
END
! call writefile(export, 'Xexport.vim')
! let buf = RunVimInTerminal('-c "import Foo from ''./Xexport.vim''"',
#{rows: 6, wait_for_ruler: 0})
! call WaitForAssert({-> assert_match('^E1094:', term_getline(buf, 5))})
! call delete('Xexport.vim')
! call StopVimInTerminal(buf)
! endfunc
def Test_vim9script_reload_import()
let lines =<< trim END
--- 781,806 ----
func Test_import_fails_without_script()
CheckRunVimInTerminal
+ " call indirectly to avoid compilation error for missing functions
+ call Run_Test_import_fails_without_script()
+ endfunc
+
+ def Run_Test_import_fails_without_script()
let export =<< trim END
vim9script
export def Foo(): number
return 0
enddef
END
! writefile(export, 'Xexport.vim')
! let buf = RunVimInTerminal('-c "import Foo from ''./Xexport.vim''"', #{
! rows: 6, wait_for_ruler: 0})
! WaitForAssert({-> assert_match('^E1094:', term_getline(buf, 5))})
! delete('Xexport.vim')
! StopVimInTerminal(buf)
! enddef
def Test_vim9script_reload_import()
let lines =<< trim END
*** ../vim-8.2.0993/src/version.c 2020-06-17 12:04:50.433837356 +0200
--- src/version.c 2020-06-17 19:52:02.472273729 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 994,
/**/
--
Trees moving back and forth is what makes the wind blow.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202006171804.05HI42Lb124729%40masaka.moolenaar.net.