]> granicus.if.org Git - vim/commitdiff
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expression v8.0.1249
authorBram Moolenaar <Bram@vim.org>
Thu, 2 Nov 2017 17:19:19 +0000 (18:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 2 Nov 2017 17:19:19 +0000 (18:19 +0100)
Problem:    No error when WaitFor() gets an invalid wrong expression.
Solution:   Do not ignore errors in evaluationg the expression.  Fix places
            where the expression was wrong.

src/testdir/shared.vim
src/testdir/test_netbeans.vim
src/version.c

index eb43cf4e74d62ac8bfbfba3926247fc77b95242f..d6033d581187a85f2b7a7b2955646976e3acb464 100644 (file)
@@ -125,15 +125,12 @@ func WaitFor(expr, ...)
     let slept = 0
   endif
   for i in range(timeout / 10)
-    try
-      if eval(a:expr)
-       if has('reltime')
-         return float2nr(reltimefloat(reltime(start)) * 1000)
-       endif
-       return slept
+    if eval(a:expr)
+      if has('reltime')
+       return float2nr(reltimefloat(reltime(start)) * 1000)
       endif
-    catch
-    endtry
+      return slept
+    endif
     if !has('reltime')
       let slept += 10
     endif
index 4ac03db6f56b41cd4b401239852825f72948c88b..aa4e67661a70614c7ebf62ae041fda105ad106e0 100644 (file)
@@ -19,6 +19,7 @@ endfunc
 
 func Nb_basic(port)
   call delete("Xnetbeans")
+  call writefile([], "Xnetbeans")
   exe 'nbstart :localhost:' . a:port . ':bunny'
   call assert_true(has("netbeans_enabled"))
 
@@ -53,6 +54,9 @@ func Test_nb_basic()
 endfunc
 
 func Nb_file_auth(port)
+  call delete("Xnetbeans")
+  call writefile([], "Xnetbeans")
+
   call assert_fails('nbstart =notexist', 'E660:')
   call writefile(['host=localhost', 'port=' . a:port, 'auth=bunny'], 'Xnbauth')
   if has('unix')
index 3504ff6c3f82933f74f5cf58130039d0af2e3e8b..56e2910fd08cb673eb8f52a9683a6caa690ff770 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1249,
 /**/
     1248,
 /**/