comparison src/testdir/test_terminal.vim @ 19651:283c8bc6a8e2 v8.2.0382

patch 8.2.0382: some tests fail when run under valgrind Commit: https://github.com/vim/vim/commit/353c351bd22e4dac4c3ae9cd7731032348f248c4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 15 14:19:26 2020 +0100 patch 8.2.0382: some tests fail when run under valgrind Problem: Some tests fail when run under valgrind. Solution: Increase timeouts.
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 Mar 2020 14:30:05 +0100
parents c8cb1a41f64c
children a088571e1d9d
comparison
equal deleted inserted replaced
19650:1d036bf38467 19651:283c8bc6a8e2
2340 let lines = [ 2340 let lines = [
2341 \ 'set t_u7=', 2341 \ 'set t_u7=',
2342 \ 'call setline(1, range(20))', 2342 \ 'call setline(1, range(20))',
2343 \ 'hi PopTerm ctermbg=grey', 2343 \ 'hi PopTerm ctermbg=grey',
2344 \ 'func OpenTerm(setColor)', 2344 \ 'func OpenTerm(setColor)',
2345 \ " set noruler",
2345 \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})", 2346 \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})",
2346 \ ' let g:winid = popup_create(s:buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})', 2347 \ ' let g:winid = popup_create(s:buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: 1})',
2347 \ ' if a:setColor', 2348 \ ' if a:setColor',
2348 \ ' call win_execute(g:winid, "set wincolor=PopTerm")', 2349 \ ' call win_execute(g:winid, "set wincolor=PopTerm")',
2349 \ ' endif', 2350 \ ' endif',
2358 \ ' call popup_create(s:buf, #{minwidth: 40, minheight: 6, border: []})', 2359 \ ' call popup_create(s:buf, #{minwidth: 40, minheight: 6, border: []})',
2359 \ 'endfunc', 2360 \ 'endfunc',
2360 \ ] 2361 \ ]
2361 call writefile(lines, 'XtermPopup') 2362 call writefile(lines, 'XtermPopup')
2362 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15}) 2363 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
2363 call term_wait(buf, 100) 2364 call term_wait(buf, 200)
2364 call term_sendkeys(buf, "\<C-L>")
2365 call term_sendkeys(buf, ":call OpenTerm(0)\<CR>") 2365 call term_sendkeys(buf, ":call OpenTerm(0)\<CR>")
2366 call term_wait(buf, 100) 2366 call term_wait(buf, 200)
2367 call term_sendkeys(buf, ":\<CR>") 2367 call term_sendkeys(buf, ":\<CR>")
2368 call term_wait(buf, 200)
2368 call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\") win_gettype(g:winid)\<CR>") 2369 call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\") win_gettype(g:winid)\<CR>")
2369 call VerifyScreenDump(buf, 'Test_terminal_popup_1', {}) 2370 call VerifyScreenDump(buf, 'Test_terminal_popup_1', {})
2370 2371
2371 call term_sendkeys(buf, ":q\<CR>") 2372 call term_sendkeys(buf, ":q\<CR>")
2372 call VerifyScreenDump(buf, 'Test_terminal_popup_2', {}) 2373 call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
2373 2374
2374 call term_sendkeys(buf, ":call OpenTerm(1)\<CR>") 2375 call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
2376 call term_wait(buf, 300)
2375 call term_sendkeys(buf, ":set hlsearch\<CR>") 2377 call term_sendkeys(buf, ":set hlsearch\<CR>")
2376 call term_sendkeys(buf, "/edit\<CR>") 2378 call term_sendkeys(buf, "/edit\<CR>")
2377 call VerifyScreenDump(buf, 'Test_terminal_popup_3', {}) 2379 call VerifyScreenDump(buf, 'Test_terminal_popup_3', {})
2378 2380
2379 call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>") 2381 call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>")
2395 call term_sendkeys(buf, "A") 2397 call term_sendkeys(buf, "A")
2396 call VerifyScreenDump(buf, 'Test_terminal_popup_8', {}) 2398 call VerifyScreenDump(buf, 'Test_terminal_popup_8', {})
2397 2399
2398 call term_wait(buf, 100) 2400 call term_wait(buf, 100)
2399 call term_sendkeys(buf, ":q\<CR>") 2401 call term_sendkeys(buf, ":q\<CR>")
2400 call term_wait(buf, 100) " wait for terminal to vanish 2402 call term_wait(buf, 200) " wait for terminal to vanish
2401 2403
2402 call StopVimInTerminal(buf) 2404 call StopVimInTerminal(buf)
2403 call delete('Xtext') 2405 call delete('Xtext')
2404 call delete('XtermPopup') 2406 call delete('XtermPopup')
2405 endfunc 2407 endfunc
2423 \ ' let g:winid = popup_create(s:buf, #{ border: []})', 2425 \ ' let g:winid = popup_create(s:buf, #{ border: []})',
2424 \ 'endfunc', 2426 \ 'endfunc',
2425 \ ] 2427 \ ]
2426 call writefile(lines, 'XtermPopup') 2428 call writefile(lines, 'XtermPopup')
2427 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15}) 2429 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
2428 call term_wait(buf, 100) 2430 call term_wait(buf, 200)
2429 call term_sendkeys(buf, "\<C-L>") 2431 call term_sendkeys(buf, ":set noruler\<CR>")
2430 call term_sendkeys(buf, ":call OpenTerm()\<CR>") 2432 call term_sendkeys(buf, ":call OpenTerm()\<CR>")
2431 call term_wait(buf, 100) 2433 call term_wait(buf, 100)
2432 call term_sendkeys(buf, ":\<CR>") 2434 call term_sendkeys(buf, ":\<CR>")
2433 call VerifyScreenDump(buf, 'Test_terminal_popup_m1', {}) 2435 call VerifyScreenDump(buf, 'Test_terminal_popup_m1', {})
2434 2436