Mercurial > vim
comparison src/testdir/shared.vim @ 12734:810a4c3d4f7e v8.0.1245
patch 8.0.1245: when WaitFor() has a wrong expression it just waits a second
commit https://github.com/vim/vim/commit/3e1c617d49224038a820ee2c552ebe31a84aaa89
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 16:58:00 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 17:00:08 +0100 |
parents | 9359ed49d375 |
children | af961e38e508 |
comparison
equal
deleted
inserted
replaced
12733:61937df27f3a | 12734:810a4c3d4f7e |
---|---|
137 if !has('reltime') | 137 if !has('reltime') |
138 let slept += 10 | 138 let slept += 10 |
139 endif | 139 endif |
140 sleep 10m | 140 sleep 10m |
141 endfor | 141 endfor |
142 return timeout | 142 throw 'WaitFor() timed out after ' . timeout . ' msec' |
143 endfunc | 143 endfunc |
144 | 144 |
145 " Wait for up to a given milliseconds. | 145 " Wait for up to a given milliseconds. |
146 " With the +timers feature this waits for key-input by getchar(), Resume() | 146 " With the +timers feature this waits for key-input by getchar(), Resume() |
147 " feeds key-input and resumes process. Return time waited in milliseconds. | 147 " feeds key-input and resumes process. Return time waited in milliseconds. |