mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
vim-patch:9.1.0794: tests: tests may fail on Windows environment (#30874)
Problem: tests: tests may fail on Windows environment
Solution: use shellcmdflag=/D to skip executing autorun from
the registry (Milly)
closes: vim/vim#15900
4f5681dbdf
Cherry-pick Test_cursorhold_insert_with_timer_interrupt() change from
patch 8.2.1836.
Co-authored-by: Milly <milly.ca@gmail.com>
This commit is contained in:
parent
573fcb8b66
commit
ce9a9b4700
@ -64,7 +64,7 @@ func RunCommand(cmd)
|
|||||||
let job = job_start(a:cmd, {"stoponexit": "hup"})
|
let job = job_start(a:cmd, {"stoponexit": "hup"})
|
||||||
call job_setoptions(job, {"stoponexit": "kill"})
|
call job_setoptions(job, {"stoponexit": "kill"})
|
||||||
elseif has('win32')
|
elseif has('win32')
|
||||||
exe 'silent !start cmd /c start "test_channel" ' . a:cmd
|
exe 'silent !start cmd /D /c start "test_channel" ' . a:cmd
|
||||||
else
|
else
|
||||||
exe 'silent !' . a:cmd . '&'
|
exe 'silent !' . a:cmd . '&'
|
||||||
endif
|
endif
|
||||||
|
@ -88,9 +88,9 @@ if has('timers')
|
|||||||
" CursorHoldI event.
|
" CursorHoldI event.
|
||||||
let g:triggered = 0
|
let g:triggered = 0
|
||||||
au CursorHoldI * let g:triggered += 1
|
au CursorHoldI * let g:triggered += 1
|
||||||
set updatetime=500
|
set updatetime=100
|
||||||
call job_start(has('win32') ? 'cmd /c echo:' : 'echo',
|
call job_start(has('win32') ? 'cmd /D /c echo:' : 'echo',
|
||||||
\ {'exit_cb': {-> timer_start(1000, 'ExitInsertMode')}})
|
\ {'exit_cb': {-> timer_start(200, 'ExitInsertMode')}})
|
||||||
call feedkeys('a', 'x!')
|
call feedkeys('a', 'x!')
|
||||||
call assert_equal(1, g:triggered)
|
call assert_equal(1, g:triggered)
|
||||||
unlet g:triggered
|
unlet g:triggered
|
||||||
|
@ -3097,7 +3097,7 @@ func Test_range()
|
|||||||
call assert_fails('call term_start(range(3, 4))', 'E474:')
|
call assert_fails('call term_start(range(3, 4))', 'E474:')
|
||||||
let g:terminal_ansi_colors = range(16)
|
let g:terminal_ansi_colors = range(16)
|
||||||
if has('win32')
|
if has('win32')
|
||||||
let cmd = "cmd /c dir"
|
let cmd = "cmd /D /c dir"
|
||||||
else
|
else
|
||||||
let cmd = "ls"
|
let cmd = "ls"
|
||||||
endif
|
endif
|
||||||
|
@ -420,7 +420,7 @@ func s:get_unused_pid(base)
|
|||||||
if has('job')
|
if has('job')
|
||||||
" Execute 'echo' as a temporary job, and return its pid as an unused pid.
|
" Execute 'echo' as a temporary job, and return its pid as an unused pid.
|
||||||
if has('win32')
|
if has('win32')
|
||||||
let cmd = 'cmd /c echo'
|
let cmd = 'cmd /D /c echo'
|
||||||
else
|
else
|
||||||
let cmd = 'echo'
|
let cmd = 'echo'
|
||||||
endif
|
endif
|
||||||
|
@ -105,7 +105,7 @@ func Test_WindowsHome()
|
|||||||
RestoreEnv
|
RestoreEnv
|
||||||
let $HOME = save_home
|
let $HOME = save_home
|
||||||
let env = ''
|
let env = ''
|
||||||
let job = job_start('cmd /c set', {'out_cb': {ch,x->[env,execute('let env=x')]}})
|
let job = job_start('cmd /D /c set', {'out_cb': {ch,x->[env,execute('let env=x')]}})
|
||||||
sleep 1
|
sleep 1
|
||||||
let env = filter(split(env, "\n"), 'v:val=="HOME"')
|
let env = filter(split(env, "\n"), 'v:val=="HOME"')
|
||||||
let home = len(env) == 0 ? "" : env[0]
|
let home = len(env) == 0 ? "" : env[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user