Patch 8.2.0994

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 17, 2020, 2:04:11 PM6/17/20
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- 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 ///
Reply all
Reply to author
Forward
0 new messages