Skip to content

Commit b3ca982

Browse files
committed
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.
1 parent 3896a10 commit b3ca982

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/testdir/test_vim9_script.vim

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,11 @@ let s:export_script_lines =<< trim END
11171117
enddef
11181118
END
11191119

1120+
def Undo_export_script_lines()
1121+
unlet g:result
1122+
unlet g:localname
1123+
enddef
1124+
11201125
def Test_vim9_import_export()
11211126
let import_script_lines =<< trim END
11221127
vim9script
@@ -1155,8 +1160,7 @@ def Test_vim9_import_export()
11551160
assert_equal('John Doe', g:imported_name_appended)
11561161
assert_false(exists('g:name'))
11571162

1158-
unlet g:result
1159-
unlet g:localname
1163+
Undo_export_script_lines()
11601164
unlet g:imported
11611165
unlet g:imported_added
11621166
unlet g:imported_later
@@ -1441,18 +1445,18 @@ def Test_use_import_in_mapping()
14411445
lines =<< trim END
14421446
vim9script
14431447
import Funcx from './XsomeExport.vim'
1444-
nnoremap <C-B> :call <sid>Funcx()<cr>
1448+
nnoremap <F3> :call <sid>Funcx()<cr>
14451449
END
14461450
writefile(lines, 'Xmapscript.vim')
14471451

14481452
source Xmapscript.vim
1449-
feedkeys("\<c-b>", "xt")
1453+
feedkeys("\<F3>", "xt")
14501454
assert_equal(42, g:result)
14511455

14521456
unlet g:result
14531457
delete('XsomeExport.vim')
14541458
delete('Xmapscript.vim')
1455-
nunmap <C-B>
1459+
nunmap <F3>
14561460
enddef
14571461

14581462
def Test_vim9script_fails()
@@ -1697,6 +1701,8 @@ def Test_import_absolute()
16971701
'4 LOADSCRIPT exported from .*Xexport_abs.vim.*' ..
16981702
'5 STOREG g:imported_after.*',
16991703
g:import_disassembled)
1704+
1705+
Undo_export_script_lines()
17001706
unlet g:imported_abs
17011707
unlet g:import_disassembled
17021708

@@ -1720,8 +1726,9 @@ def Test_import_rtp()
17201726
&rtp = save_rtp
17211727

17221728
assert_equal(9876, g:imported_rtp)
1723-
unlet g:imported_rtp
17241729

1730+
Undo_export_script_lines()
1731+
unlet g:imported_rtp
17251732
delete('Ximport_rtp.vim')
17261733
delete('import', 'rf')
17271734
enddef

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1404,
757759
/**/
758760
1403,
759761
/**/

0 commit comments

Comments
 (0)