mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1404: Vim9: script test fails in the GUI
Problem: Vim9: script test fails in the GUI. Solution: Use another key to map. Improve cleanup.
This commit is contained in:
@@ -1117,6 +1117,11 @@ let s:export_script_lines =<< trim END
|
|||||||
enddef
|
enddef
|
||||||
END
|
END
|
||||||
|
|
||||||
|
def Undo_export_script_lines()
|
||||||
|
unlet g:result
|
||||||
|
unlet g:localname
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_vim9_import_export()
|
def Test_vim9_import_export()
|
||||||
let import_script_lines =<< trim END
|
let import_script_lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
@@ -1155,8 +1160,7 @@ def Test_vim9_import_export()
|
|||||||
assert_equal('John Doe', g:imported_name_appended)
|
assert_equal('John Doe', g:imported_name_appended)
|
||||||
assert_false(exists('g:name'))
|
assert_false(exists('g:name'))
|
||||||
|
|
||||||
unlet g:result
|
Undo_export_script_lines()
|
||||||
unlet g:localname
|
|
||||||
unlet g:imported
|
unlet g:imported
|
||||||
unlet g:imported_added
|
unlet g:imported_added
|
||||||
unlet g:imported_later
|
unlet g:imported_later
|
||||||
@@ -1441,18 +1445,18 @@ def Test_use_import_in_mapping()
|
|||||||
lines =<< trim END
|
lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
import Funcx from './XsomeExport.vim'
|
import Funcx from './XsomeExport.vim'
|
||||||
nnoremap <C-B> :call <sid>Funcx()<cr>
|
nnoremap <F3> :call <sid>Funcx()<cr>
|
||||||
END
|
END
|
||||||
writefile(lines, 'Xmapscript.vim')
|
writefile(lines, 'Xmapscript.vim')
|
||||||
|
|
||||||
source Xmapscript.vim
|
source Xmapscript.vim
|
||||||
feedkeys("\<c-b>", "xt")
|
feedkeys("\<F3>", "xt")
|
||||||
assert_equal(42, g:result)
|
assert_equal(42, g:result)
|
||||||
|
|
||||||
unlet g:result
|
unlet g:result
|
||||||
delete('XsomeExport.vim')
|
delete('XsomeExport.vim')
|
||||||
delete('Xmapscript.vim')
|
delete('Xmapscript.vim')
|
||||||
nunmap <C-B>
|
nunmap <F3>
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_vim9script_fails()
|
def Test_vim9script_fails()
|
||||||
@@ -1697,6 +1701,8 @@ def Test_import_absolute()
|
|||||||
'4 LOADSCRIPT exported from .*Xexport_abs.vim.*' ..
|
'4 LOADSCRIPT exported from .*Xexport_abs.vim.*' ..
|
||||||
'5 STOREG g:imported_after.*',
|
'5 STOREG g:imported_after.*',
|
||||||
g:import_disassembled)
|
g:import_disassembled)
|
||||||
|
|
||||||
|
Undo_export_script_lines()
|
||||||
unlet g:imported_abs
|
unlet g:imported_abs
|
||||||
unlet g:import_disassembled
|
unlet g:import_disassembled
|
||||||
|
|
||||||
@@ -1720,8 +1726,9 @@ def Test_import_rtp()
|
|||||||
&rtp = save_rtp
|
&rtp = save_rtp
|
||||||
|
|
||||||
assert_equal(9876, g:imported_rtp)
|
assert_equal(9876, g:imported_rtp)
|
||||||
unlet g:imported_rtp
|
|
||||||
|
|
||||||
|
Undo_export_script_lines()
|
||||||
|
unlet g:imported_rtp
|
||||||
delete('Ximport_rtp.vim')
|
delete('Ximport_rtp.vim')
|
||||||
delete('import', 'rf')
|
delete('import', 'rf')
|
||||||
enddef
|
enddef
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
1404,
|
||||||
/**/
|
/**/
|
||||||
1403,
|
1403,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user