diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 20:41:03 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-20 20:41:03 -0300 |
commit | f9d327c88bd6dc8194398e9298c3574bac0c5398 (patch) | |
tree | 6d8ec587b9c63a67fa368b48a7bfef342a924348 /test/functional/shell/viml_system_spec.lua | |
parent | a21d952bdd3f7addb8d3586247722944522b1a32 (diff) | |
download | rneovim-f9d327c88bd6dc8194398e9298c3574bac0c5398.tar.gz rneovim-f9d327c88bd6dc8194398e9298c3574bac0c5398.tar.bz2 rneovim-f9d327c88bd6dc8194398e9298c3574bac0c5398.zip |
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.
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index 85c055d3be..75e9de6aa9 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -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([[ ^ | |