forked from aniani/vim
patch 8.2.4275: cannot use an autoload function from a package under start
Problem: Cannot use an autoload function from a package under start.
Solution: Also look in the "start" package directory. (Bjorn Linse,
closes #7193)
This commit is contained in:
committed by
Bram Moolenaar
parent
c570e9cf68
commit
223a950a85
@@ -246,6 +246,19 @@ func Test_packloadall()
|
||||
call assert_equal(4321, g:plugin_bar_number)
|
||||
endfunc
|
||||
|
||||
func Test_start_autoload()
|
||||
" plugin foo with an autoload directory
|
||||
let autodir = &packpath .. '/pack/mine/start/foo/autoload'
|
||||
call mkdir(autodir, 'p')
|
||||
let fname = autodir .. '/foobar.vim'
|
||||
call writefile(['func foobar#test()',
|
||||
\ ' return 1666',
|
||||
\ 'endfunc'], fname)
|
||||
|
||||
call assert_equal(1666, foobar#test())
|
||||
call delete(fname)
|
||||
endfunc
|
||||
|
||||
func Test_helptags()
|
||||
let docdir1 = &packpath . '/pack/mine/start/foo/doc'
|
||||
let docdir2 = &packpath . '/pack/mine/start/bar/doc'
|
||||
|
||||
Reference in New Issue
Block a user