aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shell/viml_system_spec.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-02-06 15:11:04 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-02-06 15:24:08 -0300
commit11fa4f42fd7cf02b9bf28dfe4e77fa3f4910c1c2 (patch)
tree7e7068df2451c7a1574d7e4e9be35eb6fb511a22 /test/functional/shell/viml_system_spec.lua
parent281cd3856cc2b14ccb05f77953bf16cd45cf92a3 (diff)
downloadrneovim-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.lua4
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([[
^ |