mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yet
Problem: Vim9: autoload mechanism doesn't fully work yet. Solution: Define functions and variables with their autoload name, add the prefix when calling a function, find the variable in the table of script variables.
This commit is contained in:
@@ -3049,6 +3049,14 @@ def Test_vim9_autoload()
|
||||
assert_false(exists('g:prefixed_loaded'))
|
||||
assert_equal('test', prefixed.Gettest())
|
||||
assert_equal('yes', g:prefixed_loaded)
|
||||
assert_equal('name', prefixed.name)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
# can also get the items by autoload name
|
||||
lines =<< trim END
|
||||
call assert_equal('test', prefixed#Gettest())
|
||||
call assert_equal('name', prefixed#name)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
|
Reference in New Issue
Block a user