1
0
forked from aniani/vim

patch 9.0.0269: getscriptinfo() does not include the version

Problem:    getscriptinfo() does not include the version.  Cannot select
            entries by script name.
Solution:   Add the "version" item and the "name" argument. (Yegappan
            Lakshmanan, closes #10962)
This commit is contained in:
Yegappan Lakshmanan
2022-08-25 17:40:40 +01:00
committed by Bram Moolenaar
parent 0166e398d1
commit 520f6ef60a
7 changed files with 76 additions and 10 deletions

View File

@@ -732,10 +732,15 @@ def Test_use_relative_autoload_import_in_mapping()
source Xmapscript.vim
assert_match('\d\+ A: .*XrelautoloadExport.vim', execute('scriptnames')->split("\n")[-1])
assert_match('XrelautoloadExport.vim$', getscriptinfo()[-1].name)
assert_true(getscriptinfo()[-1].autoload)
var l = getscriptinfo()
assert_match('XrelautoloadExport.vim$', l[-1].name)
assert_true(l[-1].autoload)
feedkeys("\<F3>", "xt")
assert_equal(42, g:result)
l = getscriptinfo({name: 'XrelautoloadExport'})
assert_true(len(l) == 1)
assert_match('XrelautoloadExport.vim$', l[0].name)
assert_false(l[0].autoload)
unlet g:result
delete('XrelautoloadExport.vim')