From 850f91c51c7f4cd852e713ee1802bc9ab170d5cb Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 16 May 2016 21:58:42 -0400 Subject: 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 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/nvim/testdir/test_help_tagjump.vim (limited to 'src/nvim/testdir') 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 -- cgit From c3c409c70f46498e2cb549905cacfa3cf49c1383 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Mon, 9 May 2016 23:37:51 -0700 Subject: vim-patch:7.4.1728 patch 7.4.1728 Problem: The help for functions require a space after the "(". Solution: Make CTRL-] on a function name ignore the arguments. (Hirohito Higashi) https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f --- src/nvim/testdir/test_help_tagjump.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_help_tagjump.vim b/src/nvim/testdir/test_help_tagjump.vim index e09c27b5cb..9f9207d27d 100644 --- a/src/nvim/testdir/test_help_tagjump.vim +++ b/src/nvim/testdir/test_help_tagjump.vim @@ -27,4 +27,14 @@ func Test_help_tagjump() call assert_equal("help", &filetype) call assert_true(getline('.') =~ "\\*'buflisted'\\*") helpclose + + exec "help! abs({expr})" + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*abs()\*') + helpclose + + exec "help! arglistid([{winnr})" + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*arglistid()\*') + helpclose endfunc -- cgit