diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-06 15:11:04 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-02-06 15:24:08 -0300 |
commit | 11fa4f42fd7cf02b9bf28dfe4e77fa3f4910c1c2 (patch) | |
tree | 7e7068df2451c7a1574d7e4e9be35eb6fb511a22 /test/functional/shell/viml_system_spec.lua | |
parent | 281cd3856cc2b14ccb05f77953bf16cd45cf92a3 (diff) | |
download | rneovim-11fa4f42fd7cf02b9bf28dfe4e77fa3f4910c1c2.tar.gz rneovim-11fa4f42fd7cf02b9bf28dfe4e77fa3f4910c1c2.tar.bz2 rneovim-11fa4f42fd7cf02b9bf28dfe4e77fa3f4910c1c2.zip |
test: Remove nondeterminism in systemlist interrupt tests
The systemlist test currently calls the `echo` command which can potentially
complete before being interrupted, causing random test failures.
Use `yes | xargs` instead. A `yes` invocation that is not piped through `xargs`
can produce a huge amount of lines in a very short time, leading memory
starvation when the result is being converted into a list. `xargs` ensures only
one line of output will be produced while allowing interrupt to be tested.
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index 25d2b5bc2c..d24646e712 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -248,7 +248,7 @@ describe('systemlist()', function() end) it('`yes` and is directly interrupted with CTRL-C', function() - feed(':call systemlist("echo")<cr><c-c>') + feed(':call systemlist("yes | xargs")<cr><c-c>') screen:expect([[ ^ | ~ | @@ -268,7 +268,7 @@ describe('systemlist()', function() end) it('`yes` and is a little bit later interrupted with CTRL-C', function() - feed(':call systemlist("echo")<cr>') + feed(':call systemlist("yes | xargs")<cr>') feed('<c-c>') screen:expect([[ ^ | |