mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
test: Add extra screen expectation to prevent race condition
This is to ensure ctrl+c is only pressed after the command has started executing in the viml_system_spec.lua system() interrupt test.
This commit is contained in:
parent
a21d952bdd
commit
f9d327c88b
@ -79,6 +79,22 @@ describe('system()', function()
|
||||
|
||||
it('`yes` and is interrupted with CTRL-C', function()
|
||||
feed(':call system("yes")<cr>')
|
||||
screen:expect([[
|
||||
|
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
^call system("yes") |
|
||||
]])
|
||||
feed('<c-c>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
@ -227,8 +243,24 @@ describe('systemlist()', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('`yes` and is a little bit later interrupted with CTRL-C', function()
|
||||
it('`yes` and is interrupted with CTRL-C', function()
|
||||
feed(':call systemlist("yes | xargs")<cr>')
|
||||
screen:expect([[
|
||||
|
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
^call systemlist("yes | xargs") |
|
||||
]])
|
||||
feed('<c-c>')
|
||||
screen:expect([[
|
||||
^ |
|
||||
|
Loading…
Reference in New Issue
Block a user