Mercurial > vim
changeset 28676:89ff3a0fff82 v8.2.4862
patch 8.2.4862: Vim9: test may fail when run with valgrind
Commit: https://github.com/vim/vim/commit/23d44493f1e82365f0a1dbd372fc2546811942f4
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 4 16:24:57 2022 +0100
patch 8.2.4862: Vim9: test may fail when run with valgrind
Problem: Vim9: test may fail when run with valgrind.
Solution: Wait longer for callback if needed.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 May 2022 17:30:03 +0200 |
parents | 9723c016fa33 |
children | aefbe6115141 |
files | src/testdir/test_vim9_script.vim src/version.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -3707,6 +3707,7 @@ def Test_no_unknown_error_after_error() enddef def Exit_cb(...l: list<any>) sleep 1m + g:did_call_exit_cb = true source += l enddef var myjob = job_start('echo burp', {out_cb: Out_cb, exit_cb: Exit_cb, mode: 'raw'}) @@ -3714,7 +3715,13 @@ def Test_no_unknown_error_after_error() sleep 10m endwhile # wait for Exit_cb() to be called - sleep 200m + for x in range(100) + if exists('g:did_call_exit_cb') + unlet g:did_call_exit_cb + break + endif + sleep 10m + endfor END writefile(lines, 'Xdef') assert_fails('so Xdef', ['E684:', 'E1012:'])