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:
Daniel Hahler
2019-08-28 22:47:54 +02:00
committed by GitHub
parent 1d59575450
commit 6cc76194b2
13 changed files with 23 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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')

View File

@@ -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())