From 850f91c51c7f4cd852e713ee1802bc9ab170d5cb Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 May 2016 21:58:42 -0400 Subject: [PATCH] vim-patch:7.4.1571 patch 7.4.1571 Problem: No test for ":help" Solution: Add a test for what 7.4.1568 fixed. (Higashi Higashi) https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33 --- src/nvim/testdir/Makefile | 3 ++- src/nvim/testdir/test_help_tagjump.vim | 30 ++++++++++++++++++++++++++ src/nvim/version.c | 2 +- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/nvim/testdir/test_help_tagjump.vim diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index b763a67347..7195c7e632 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -39,8 +39,9 @@ SCRIPTS := \ # Tests using runtest.vim.vim. # Keep test_alot*.res as the last one, sort the others. NEW_TESTS = \ - test_viml.res \ test_cursor_func.res \ + test_help_tagjump.res \ + test_viml.res \ test_alot.res SCRIPTS_GUI := test16.out diff --git a/src/nvim/testdir/test_help_tagjump.vim b/src/nvim/testdir/test_help_tagjump.vim new file mode 100644 index 0000000000..e09c27b5cb --- /dev/null +++ b/src/nvim/testdir/test_help_tagjump.vim @@ -0,0 +1,30 @@ +" 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() + help + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*help.txt\*') + helpclose + + exec "help! ('textwidth'" + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ "\\*'textwidth'\\*") + helpclose + + exec "help! ('buflisted')," + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ "\\*'buflisted'\\*") + helpclose +endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index 74822c308f..db3c896a74 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -111,7 +111,7 @@ static int included_patches[] = { 1574, // 1573, // 1572 NA - // 1571, + 1571, 1570, 1569, 1568,