To: vim_dev@googlegroups.com Subject: Patch 8.0.0470 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0470 Problem: Not enough testing for help commands. Solution: Add a few more help tests. (Dominique Pelle, closes #1565) Files: src/testdir/test_help.vim, src/testdir/test_help_tagjump.vim *** ../vim-8.0.0469/src/testdir/test_help.vim 2017-02-17 12:04:35.843808317 +0100 --- src/testdir/test_help.vim 2017-03-16 22:15:33.452954315 +0100 *************** *** 8,10 **** --- 8,15 ---- help helpclose endfunc + + func Test_help_errors() + call assert_fails('help doesnotexist', 'E149:') + call assert_fails('help!', 'E478:') + endfunc *** ../vim-8.0.0469/src/testdir/test_help_tagjump.vim 2016-12-01 21:32:28.678025257 +0100 --- src/testdir/test_help_tagjump.vim 2017-03-16 22:15:33.452954315 +0100 *************** *** 6,11 **** --- 6,57 ---- 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 \" + 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,40 **** --- 81,96 ---- 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'] *** ../vim-8.0.0469/src/version.c 2017-03-16 22:06:51.824726916 +0100 --- src/version.c 2017-03-16 22:16:36.076499048 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 470, /**/ -- The coffee just wasn't strong enough to defend itself -- Tom Waits /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///