diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-16 22:26:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-16 22:26:44 +0100 |
commit | 751ba616d1c47de2c273b269df06c36a7ed141a2 (patch) | |
tree | 22e882a85cde0eb682622a46e7b6622e875e3908 | |
parent | 0c0d4eca4dd6252f22ec39f2d561a5e8a68e9a4e (diff) | |
download | vim-git-751ba616d1c47de2c273b269df06c36a7ed141a2.tar.gz |
patch 8.0.0470: not enough testing for help commandsv8.0.0470
Problem: Not enough testing for help commands.
Solution: Add a few more help tests. (Dominique Pelle, closes #1565)
-rw-r--r-- | src/testdir/test_help.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_help_tagjump.vim | 56 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 63 insertions, 0 deletions
diff --git a/src/testdir/test_help.vim b/src/testdir/test_help.vim index ca095d067..5a35b691a 100644 --- a/src/testdir/test_help.vim +++ b/src/testdir/test_help.vim @@ -8,3 +8,8 @@ func Test_help_restore_snapshot() help helpclose endfunc + +func Test_help_errors() + call assert_fails('help doesnotexist', 'E149:') + call assert_fails('help!', 'E478:') +endfunc diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim index 1d443894b..51b006c57 100644 --- a/src/testdir/test_help_tagjump.vim +++ b/src/testdir/test_help_tagjump.vim @@ -6,6 +6,52 @@ func Test_help_tagjump() call assert_true(getline('.') =~ '\*help.txt\*') helpclose + help | + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*bar\*') + helpclose + + help "* + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*quotestar\*') + helpclose + + help sm?le + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*:smile\*') + helpclose + + help :? + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*:?\*') + helpclose + + help FileW*Post + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*FileWritePost\*') + helpclose + + help `ls` + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*:ls\*') + helpclose + + help ^X + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*CTRL-X\*') + helpclose + + help i_^_CTRL-D + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*i_^_CTRL-D\*') + helpclose + + exec "help \<C-V>" + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*CTRL-V\*') + helpclose + + exec "help! ('textwidth'" call assert_equal("help", &filetype) call assert_true(getline('.') =~ "\\*'textwidth'\\*") @@ -35,6 +81,16 @@ func Test_help_tagjump() call assert_equal("help", &filetype) call assert_true(getline('.') =~ '\*{address}\*') helpclose + + exusage + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*:index\*') + helpclose + + viusage + call assert_equal("help", &filetype) + call assert_true(getline('.') =~ '\*normal-index\*') + helpclose endfunc let s:langs = ['en', 'ab', 'ja'] diff --git a/src/version.c b/src/version.c index bc8500686..a132167e2 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 470, +/**/ 469, /**/ 468, |