0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.0.0663: unexpected error message only when 'verbose' is set

Problem:    Giving an error message only when 'verbose' set is unexpected.
Solution:   Give a warning message instead.
This commit is contained in:
Bram Moolenaar
2017-06-23 20:52:40 +02:00
parent 4670490673
commit f8be461d02
6 changed files with 39 additions and 18 deletions

View File

@@ -1381,10 +1381,12 @@ func Test_endfunction_trailing()
set verbose=1
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
call assert_notmatch('W22:', split(execute('1messages'), "\n")[0])
call assert_true(exists('*Xtest'))
delfunc Xtest
call assert_fails("func Xtest()\necho 'hello'\nendfunc garbage", 'E946')
exe "func Xtest()\necho 'hello'\nendfunc garbage"
call assert_match('W22:', split(execute('1messages'), "\n")[0])
call assert_true(exists('*Xtest'))
delfunc Xtest
set verbose=0