Mercurial > vim
comparison src/testdir/test_quotestar.vim @ 22969:dcb59b1cc0c1 v8.2.2031
patch 8.2.2031: some tests fail when run under valgrind
Commit: https://github.com/vim/vim/commit/18dc355395f2eac72ab83d984cacd26ae61c791f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 22 14:24:00 2020 +0100
patch 8.2.2031: some tests fail when run under valgrind
Problem: Some tests fail when run under valgrind.
Solution: Avoid timing problems.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Nov 2020 14:30:06 +0100 |
parents | 08940efa6b4e |
children | a5a772dace5b |
comparison
equal
deleted
inserted
replaced
22968:5ae81cb3da0a | 22969:dcb59b1cc0c1 |
---|---|
96 if has('unix') && has('gui') && !has('gui_running') | 96 if has('unix') && has('gui') && !has('gui_running') |
97 let @* = '' | 97 let @* = '' |
98 | 98 |
99 " Running in a terminal and the GUI is available: Tell the server to open | 99 " Running in a terminal and the GUI is available: Tell the server to open |
100 " the GUI and check that the remote command still works. | 100 " the GUI and check that the remote command still works. |
101 " Need to wait for the GUI to start up, otherwise the send hangs in trying | |
102 " to send to the terminal window. | |
103 if has('gui_athena') || has('gui_motif') | 101 if has('gui_athena') || has('gui_motif') |
104 " For those GUIs, ignore the 'failed to create input context' error. | 102 " For those GUIs, ignore the 'failed to create input context' error. |
105 call remote_send(name, ":call test_ignore_error('E285') | gui -f\<CR>") | 103 call remote_send(name, ":call test_ignore_error('E285') | gui -f\<CR>") |
106 else | 104 else |
107 call remote_send(name, ":gui -f\<CR>") | 105 call remote_send(name, ":gui -f\<CR>") |
108 endif | 106 endif |
109 " Wait for the server in the GUI to be up and answering requests. | 107 " Wait for the server in the GUI to be up and answering requests. |
108 " First need to wait for the GUI to start up, otherwise the send hangs in | |
109 " trying to send to the terminal window. | |
110 " On some systems and with valgrind this can be very slow. | 110 " On some systems and with valgrind this can be very slow. |
111 sleep 1 | |
111 call WaitForAssert({-> assert_match("1", remote_expr(name, "has('gui_running')", "", 1))}, 10000) | 112 call WaitForAssert({-> assert_match("1", remote_expr(name, "has('gui_running')", "", 1))}, 10000) |
112 | 113 |
113 call remote_send(name, ":let @* = 'maybe'\<CR>") | 114 call remote_send(name, ":let @* = 'maybe'\<CR>") |
114 call WaitForAssert({-> assert_equal("maybe", remote_expr(name, "@*", "", 2))}) | 115 call WaitForAssert({-> assert_equal("maybe", remote_expr(name, "@*", "", 2))}) |
115 | 116 |