diff src/testdir/test_vimscript.vim @ 11561:7ad79766365a v8.0.0663

patch 8.0.0663: unexpected error message only when 'verbose' is set commit https://github.com/vim/vim/commit/f8be461d0284110b321be748fea206d4169b98bb Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 23 20:52:40 2017 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Fri, 23 Jun 2017 21:00:03 +0200
parents 3d03ed329a54
children 7003f241b6c7
line wrap: on
line diff
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -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