diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-02 18:19:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-02 18:19:19 +0100 |
commit | c20e0d52071a3f6e12321ec3344024faa4695da9 (patch) | |
tree | 2dd2883a4ee0527eb2c657b754bdc7007af6336c /src | |
parent | 5130f316612dfc71c433c2743340dc45444eb17d (diff) |
patch 8.0.1249: no error when WaitFor() gets an invalid wrong expressionv8.0.1249
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/shared.vim | 13 | ||||
-rw-r--r-- | src/testdir/test_netbeans.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index eb43cf4e74..d6033d5811 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -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 diff --git a/src/testdir/test_netbeans.vim b/src/testdir/test_netbeans.vim index 4ac03db6f5..aa4e67661a 100644 --- a/src/testdir/test_netbeans.vim +++ b/src/testdir/test_netbeans.vim @@ -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') diff --git a/src/version.c b/src/version.c index 3504ff6c3f..56e2910fd0 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1249, +/**/ 1248, /**/ 1247, |