mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.0470: not enough testing for help commands
Problem: Not enough testing for help commands. Solution: Add a few more help tests. (Dominique Pelle, closes #1565)
This commit is contained in:
@@ -8,3 +8,8 @@ func Test_help_restore_snapshot()
|
|||||||
help
|
help
|
||||||
helpclose
|
helpclose
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_help_errors()
|
||||||
|
call assert_fails('help doesnotexist', 'E149:')
|
||||||
|
call assert_fails('help!', 'E478:')
|
||||||
|
endfunc
|
||||||
|
@@ -6,6 +6,52 @@ func Test_help_tagjump()
|
|||||||
call assert_true(getline('.') =~ '\*help.txt\*')
|
call assert_true(getline('.') =~ '\*help.txt\*')
|
||||||
helpclose
|
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'"
|
exec "help! ('textwidth'"
|
||||||
call assert_equal("help", &filetype)
|
call assert_equal("help", &filetype)
|
||||||
call assert_true(getline('.') =~ "\\*'textwidth'\\*")
|
call assert_true(getline('.') =~ "\\*'textwidth'\\*")
|
||||||
@@ -35,6 +81,16 @@ func Test_help_tagjump()
|
|||||||
call assert_equal("help", &filetype)
|
call assert_equal("help", &filetype)
|
||||||
call assert_true(getline('.') =~ '\*{address}\*')
|
call assert_true(getline('.') =~ '\*{address}\*')
|
||||||
helpclose
|
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
|
endfunc
|
||||||
|
|
||||||
let s:langs = ['en', 'ab', 'ja']
|
let s:langs = ['en', 'ab', 'ja']
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
470,
|
||||||
/**/
|
/**/
|
||||||
469,
|
469,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user