aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-05-17 02:16:56 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-05-17 02:16:56 -0400
commit50cf32775d1fb4ca8fdd6e0c2cc0486f27b57c4e (patch)
treee156b243f02ffc53d4f9ce4d1887f87ef0a61b31 /src/nvim/testdir
parent3f3a3cb65f02b8088dea911094421f8ce79e521a (diff)
parentab60a73b6a9cdd5685161a80a797a567876cd40d (diff)
downloadrneovim-50cf32775d1fb4ca8fdd6e0c2cc0486f27b57c4e.tar.gz
rneovim-50cf32775d1fb4ca8fdd6e0c2cc0486f27b57c4e.tar.bz2
rneovim-50cf32775d1fb4ca8fdd6e0c2cc0486f27b57c4e.zip
Merge pull request #4769 from jamessan/vim-7.4.1568
vim-patch:7.4.1568,7.4.1571,7.4.1728
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/Makefile3
-rw-r--r--src/nvim/testdir/test_help_tagjump.vim40
2 files changed, 42 insertions, 1 deletions
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..9f9207d27d
--- /dev/null
+++ b/src/nvim/testdir/test_help_tagjump.vim
@@ -0,0 +1,40 @@
+" 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
+
+ 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