Mercurial > vim
diff src/testdir/test_terminal.vim @ 12405:6ef5e636f246 v8.0.1082
patch 8.0.1082: tests fail when run under valgrind
commit https://github.com/vim/vim/commit/9d18961323a2a5c3b609c98ce0d78613c71f3532
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 9 18:11:00 2017 +0200
patch 8.0.1082: tests fail when run under valgrind
Problem: Tests fail when run under valgrind.
Solution: Increase waiting times.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Sep 2017 18:15:04 +0200 |
parents | d0cf7f71b95b |
children | e9dbdc4d8279 |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -104,6 +104,15 @@ func! s:Nasty_exit_cb(job, st) let g:buf = 0 endfunc +func Get_cat_123_cmd() + if has('win32') + return 'cmd /c "cls && color 2 && echo 123"' + else + call writefile(["\<Esc>[32m123"], 'Xtext') + return "cat Xtext" + endif +endfunc + func Test_terminal_nasty_cb() let cmd = Get_cat_123_cmd() let g:buf = term_start(cmd, {'exit_cb': function('s:Nasty_exit_cb')}) @@ -143,15 +152,6 @@ func Check_123(buf) call assert_equal('123', l) endfunc -func Get_cat_123_cmd() - if has('win32') - return 'cmd /c "cls && color 2 && echo 123"' - else - call writefile(["\<Esc>[32m123"], 'Xtext') - return "cat Xtext" - endif -endfunc - func Test_terminal_scrape_123() let cmd = Get_cat_123_cmd() let buf = term_start(cmd) @@ -393,7 +393,6 @@ func Test_finish_open_close() call assert_equal(2, winnr('$')) call assert_equal(4, winheight(0)) bwipe - endfunc func Test_terminal_cwd() @@ -613,6 +612,7 @@ func Test_terminal_redir_file() call term_wait(buf) call WaitFor('len(readfile("Xfile")) > 0') call assert_match('executing job failed', readfile('Xfile')[0]) + call WaitFor('!&modified') call delete('Xfile') bwipe