comparison src/testdir/test_terminal.vim @ 22902:1bde09eef44a v8.2.1998

patch 8.2.1998: terminal Cmd test sometimes fails to close popup Commit: https://github.com/vim/vim/commit/27f4f6baeeb25e1597a7827f4a509ecf2eb8e6e2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 16 21:02:28 2020 +0100 patch 8.2.1998: terminal Cmd test sometimes fails to close popup Problem: Terminal Cmd test sometimes fails to close popup. Solution: Add "term_finish" option.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Nov 2020 21:15:03 +0100
parents 2c1520981e63
children a7c1a92bd13c
comparison
equal deleted inserted replaced
22901:6934d2bdee9b 22902:1bde09eef44a
1257 func Test_terminal_popup_insert_cmd() 1257 func Test_terminal_popup_insert_cmd()
1258 CheckUnix 1258 CheckUnix
1259 1259
1260 inoremap <F3> <Cmd>call StartTermInPopup()<CR> 1260 inoremap <F3> <Cmd>call StartTermInPopup()<CR>
1261 func StartTermInPopup() 1261 func StartTermInPopup()
1262 call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true})->popup_create(#{highlight: 'Pmenu'}) 1262 call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true, term_finish: 'close'})->popup_create(#{highlight: 'Pmenu'})
1263 endfunc 1263 endfunc
1264 call feedkeys("i\<F3>") 1264 call feedkeys("i\<F3>")
1265 sleep 10m 1265 sleep 10m
1266 call assert_equal('n', mode()) 1266 call assert_equal('n', mode())
1267 1267
1268 call feedkeys("\<C-D>", 'xt') 1268 call feedkeys("\<C-D>", 'xt')
1269 sleep 20m 1269 sleep 50m
1270 call feedkeys(":q\<CR>", 'xt')
1271 delfunc StartTermInPopup 1270 delfunc StartTermInPopup
1272 iunmap <F3> 1271 iunmap <F3>
1273 endfunc 1272 endfunc
1274 1273
1275 func Check_dump01(off) 1274 func Check_dump01(off)