patch 8.0.1245: when WaitFor() has a wrong expression it just waits a second
Problem: When WaitFor() has a wrong expression it just waits a second,
which goes unnoticed. (James McCoy)
Solution: When WaitFor() times out throw an exception. Fix places where the
expression was wrong.
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index 8db388a..eb43cf4 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -139,7 +139,7 @@
endif
sleep 10m
endfor
- return timeout
+ throw 'WaitFor() timed out after ' . timeout . ' msec'
endfunc
" Wait for up to a given milliseconds.