mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.0994: Vim9: missing function causes compilation error
Problem: Vim9: missing function causes compilation error. Solution: Call test function indirectly.
This commit is contained in:
@@ -781,20 +781,26 @@ enddef
|
|||||||
func Test_import_fails_without_script()
|
func Test_import_fails_without_script()
|
||||||
CheckRunVimInTerminal
|
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
|
let export =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
export def Foo(): number
|
export def Foo(): number
|
||||||
return 0
|
return 0
|
||||||
enddef
|
enddef
|
||||||
END
|
END
|
||||||
call writefile(export, 'Xexport.vim')
|
writefile(export, 'Xexport.vim')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-c "import Foo from ''./Xexport.vim''"', #{rows: 6, wait_for_ruler: 0})
|
let buf = RunVimInTerminal('-c "import Foo from ''./Xexport.vim''"', #{
|
||||||
call WaitForAssert({-> assert_match('^E1094:', term_getline(buf, 5))})
|
rows: 6, wait_for_ruler: 0})
|
||||||
|
WaitForAssert({-> assert_match('^E1094:', term_getline(buf, 5))})
|
||||||
|
|
||||||
call delete('Xexport.vim')
|
delete('Xexport.vim')
|
||||||
call StopVimInTerminal(buf)
|
StopVimInTerminal(buf)
|
||||||
endfunc
|
enddef
|
||||||
|
|
||||||
def Test_vim9script_reload_import()
|
def Test_vim9script_reload_import()
|
||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
994,
|
||||||
/**/
|
/**/
|
||||||
993,
|
993,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user