mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
test(old): make ":h local-additions" work properly in test_help.vim
This commit is contained in:
@@ -105,7 +105,7 @@ set nomore
|
|||||||
lang mess C
|
lang mess C
|
||||||
|
|
||||||
" Nvim: append runtime from build dir, which contains the generated doc/tags.
|
" Nvim: append runtime from build dir, which contains the generated doc/tags.
|
||||||
let &runtimepath .= ','.expand($BUILD_DIR).'/runtime/'
|
let &runtimepath ..= ',' .. expand($BUILD_DIR) .. '/runtime/'
|
||||||
|
|
||||||
let s:t_bold = &t_md
|
let s:t_bold = &t_md
|
||||||
let s:t_normal = &t_me
|
let s:t_normal = &t_me
|
||||||
|
@@ -2,6 +2,21 @@
|
|||||||
|
|
||||||
source check.vim
|
source check.vim
|
||||||
|
|
||||||
|
func SetUp()
|
||||||
|
let s:vimruntime = $VIMRUNTIME
|
||||||
|
let s:runtimepath = &runtimepath
|
||||||
|
" Set $VIMRUNTIME to $BUILD_DIR/runtime and remove the original $VIMRUNTIME
|
||||||
|
" path from &runtimepath so that ":h local-additions" won't pick up builtin
|
||||||
|
" help files.
|
||||||
|
let $VIMRUNTIME = expand($BUILD_DIR) .. '/runtime'
|
||||||
|
set runtimepath-=../../../runtime
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func TearDown()
|
||||||
|
let $VIMRUNTIME = s:vimruntime
|
||||||
|
let &runtimepath = s:runtimepath
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_help_restore_snapshot()
|
func Test_help_restore_snapshot()
|
||||||
help
|
help
|
||||||
set buftype=
|
set buftype=
|
||||||
|
@@ -1,17 +1,5 @@
|
|||||||
" Tests for :help! {subject}
|
" Tests for :help! {subject}
|
||||||
|
|
||||||
func SetUp()
|
|
||||||
" v:progpath is …/build/bin/nvim and we need …/build/runtime
|
|
||||||
" to be added to &rtp
|
|
||||||
let builddir = fnamemodify(exepath(v:progpath), ':h:h')
|
|
||||||
let s:rtp = &rtp
|
|
||||||
let &rtp .= printf(',%s/runtime', builddir)
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func TearDown()
|
|
||||||
let &rtp = s:rtp
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func Test_help_tagjump()
|
func Test_help_tagjump()
|
||||||
help
|
help
|
||||||
call assert_equal("help", &filetype)
|
call assert_equal("help", &filetype)
|
||||||
|
Reference in New Issue
Block a user