diff src/testdir/test_mapping.vim @ 27457:4c16acb2525f v8.2.4257

patch 8.2.4257: Vim9: finding global function without g: prefix inconsistent Commit: https://github.com/vim/vim/commit/62aec93bfdb9e1b40d03a6d2e8e9511f8b1bdb2d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 29 21:45:34 2022 +0000 patch 8.2.4257: Vim9: finding global function without g: prefix inconsistent Problem: Vim9: finding global function without g: prefix but not finding global variable is inconsistent. Solution: Require using g: for a global function. Change the vim9.vim script into a Vim9 script with exports. Fix that import in legacy script does not work.
author Bram Moolenaar <Bram@vim.org>
date Sat, 29 Jan 2022 23:00:05 +0100
parents 959d6a664cfd
children ec52847967d8
line wrap: on
line diff
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -4,7 +4,7 @@ source shared.vim
 source check.vim
 source screendump.vim
 source term_util.vim
-source vim9.vim
+import './vim9.vim' as v9
 
 func Test_abbreviation()
   " abbreviation with 0x80 should work
@@ -1415,7 +1415,7 @@ func Test_map_script_cmd_restore()
       vim9script
       nnoremap <F3> <ScriptCmd>eval 1 + 2<CR>
   END
-  call CheckScriptSuccess(lines)
+  call v9.CheckScriptSuccess(lines)
   call feedkeys("\<F3>:let g:result = 3+4\<CR>", 'xtc')
   call assert_equal(7, g:result)
 
@@ -1431,7 +1431,7 @@ func Test_map_script_cmd_finds_func()
         g:func_called = 'yes'
       enddef
   END
-  call CheckScriptSuccess(lines)
+  call v9.CheckScriptSuccess(lines)
   call feedkeys("y\<F3>\<Esc>", 'xtc')
   call assert_equal('yes', g:func_called)
 
@@ -1449,7 +1449,7 @@ func Test_map_script_cmd_survives_unmap(
       feedkeys("\<F3>\<CR>", 'xct')
       assert_equal(123, b:result)
   END
-  call CheckScriptSuccess(lines)
+  call v9.CheckScriptSuccess(lines)
 
   nunmap <F3>
   unlet b:result