diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-09 14:43:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-09 14:43:58 +0200 |
commit | b3ca98240761d8f320c5a49e077d1aac6496bb21 (patch) | |
tree | bdbe7e3063fd01ba0f957fd3a48da3350c34ee4e /src/testdir | |
parent | 3896a105eb3697b1a399255ac31c742c8840bd69 (diff) |
patch 8.2.1404: Vim9: script test fails in the GUIv8.2.1404
Problem: Vim9: script test fails in the GUI.
Solution: Use another key to map. Improve cleanup.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 2f7d5654d1..d30511c394 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1117,6 +1117,11 @@ let s:export_script_lines =<< trim END enddef END +def Undo_export_script_lines() + unlet g:result + unlet g:localname +enddef + def Test_vim9_import_export() let import_script_lines =<< trim END vim9script @@ -1155,8 +1160,7 @@ def Test_vim9_import_export() assert_equal('John Doe', g:imported_name_appended) assert_false(exists('g:name')) - unlet g:result - unlet g:localname + Undo_export_script_lines() unlet g:imported unlet g:imported_added unlet g:imported_later @@ -1441,18 +1445,18 @@ def Test_use_import_in_mapping() lines =<< trim END vim9script import Funcx from './XsomeExport.vim' - nnoremap <C-B> :call <sid>Funcx()<cr> + nnoremap <F3> :call <sid>Funcx()<cr> END writefile(lines, 'Xmapscript.vim') source Xmapscript.vim - feedkeys("\<c-b>", "xt") + feedkeys("\<F3>", "xt") assert_equal(42, g:result) unlet g:result delete('XsomeExport.vim') delete('Xmapscript.vim') - nunmap <C-B> + nunmap <F3> enddef def Test_vim9script_fails() @@ -1697,6 +1701,8 @@ def Test_import_absolute() '4 LOADSCRIPT exported from .*Xexport_abs.vim.*' .. '5 STOREG g:imported_after.*', g:import_disassembled) + + Undo_export_script_lines() unlet g:imported_abs unlet g:import_disassembled @@ -1720,8 +1726,9 @@ def Test_import_rtp() &rtp = save_rtp assert_equal(9876, g:imported_rtp) - unlet g:imported_rtp + Undo_export_script_lines() + unlet g:imported_rtp delete('Ximport_rtp.vim') delete('import', 'rf') enddef |