mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
tests: use runtime from build for doc/tags with :help (#10479)
This is better practice in general, and allows to remove the "helptags ALL" hacks. Ref: https://github.com/neovim/neovim/issues/8824 Ref: https://github.com/neovim/neovim/commit/f1b67c3453c * Makefile: fix dependencies with regard to helptags - use the file as the main target to avoid unnecessary triggering - use "make oldtest" on Travis to ensure it gets built
This commit is contained in:
@@ -74,6 +74,9 @@ set nomore
|
||||
" Output all messages in English.
|
||||
lang mess C
|
||||
|
||||
" Nvim: append runtime from build dir, which contains the generated doc/tags.
|
||||
let &runtimepath .= ','.expand($BUILD_DIR).'/runtime/'
|
||||
|
||||
" Always use forward slashes.
|
||||
set shellslash
|
||||
|
||||
|
@@ -300,7 +300,6 @@ func Test_augroup_warning()
|
||||
endfunc
|
||||
|
||||
func Test_BufReadCmdHelp()
|
||||
helptags ALL
|
||||
" This used to cause access to free memory
|
||||
au BufReadCmd * e +h
|
||||
help
|
||||
@@ -382,7 +381,6 @@ func Test_three_windows()
|
||||
|
||||
only
|
||||
|
||||
helptags ALL
|
||||
help
|
||||
wincmd w
|
||||
1quit
|
||||
|
@@ -242,7 +242,6 @@ func Test_getcompletion()
|
||||
let l = getcompletion('break', 'compiler')
|
||||
call assert_equal([], l)
|
||||
|
||||
helptags ALL
|
||||
let l = getcompletion('last', 'help')
|
||||
call assert_true(index(l, ':tablast') >= 0)
|
||||
let l = getcompletion('giveup', 'help')
|
||||
|
@@ -89,8 +89,11 @@ func Test_tagfiles()
|
||||
|
||||
help
|
||||
let tf = tagfiles()
|
||||
" Nvim: expectation(s) based on tags in build dir (added to &rtp).
|
||||
" Filter out the (non-existing) '../../../runtime/doc/tags'.
|
||||
call filter(tf, 'filereadable(v:val)')
|
||||
call assert_equal(1, len(tf))
|
||||
call assert_equal(fnamemodify(expand('$VIMRUNTIME/doc/tags'), ':p:gs?\\?/?'),
|
||||
call assert_equal(fnamemodify(expand('$BUILD_DIR/runtime/doc/tags'), ':p:gs?\\?/?'),
|
||||
\ fnamemodify(tf[0], ':p:gs?\\?/?'))
|
||||
helpclose
|
||||
call assert_equal(['Xtags1', 'Xtags2'], tagfiles())
|
||||
|
Reference in New Issue
Block a user