diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-10-19 02:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 02:09:29 +0200 |
commit | 6a6f188d2ac457266c47732bf19ef8c60e79959b (patch) | |
tree | 9c0288adb64b6779b6e19dfc873f1ba0fe65b16f /test | |
parent | 657ba62a84de4ae0fd6dbaa2d3c238de4b372669 (diff) | |
parent | 9706664b8827614817a43f3a4ac4b6ae8463a906 (diff) | |
download | rneovim-6a6f188d2ac457266c47732bf19ef8c60e79959b.tar.gz rneovim-6a6f188d2ac457266c47732bf19ef8c60e79959b.tar.bz2 rneovim-6a6f188d2ac457266c47732bf19ef8c60e79959b.zip |
Merge #5502 from justinmk/error-write-to-bg-process
system('foo &', 'bar'): Show error, don't crash.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/eval/system_spec.lua (renamed from test/functional/shell/viml_system_spec.lua) | 14 | ||||
-rw-r--r-- | test/functional/ex_cmds/bang_filter_spec.lua (renamed from test/functional/shell/bang_filter_spec.lua) | 0 | ||||
-rw-r--r-- | test/functional/ex_cmds/dict_notifications_spec.lua (renamed from test/functional/dict_notifications_spec.lua) | 0 |
3 files changed, 10 insertions, 4 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/eval/system_spec.lua index b8de7cc86f..b8f1f87f30 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/eval/system_spec.lua @@ -1,7 +1,3 @@ --- Specs for --- - `system()` --- - `systemlist()` - local helpers = require('test.functional.helpers')(after_each) local eq, clear, eval, feed, nvim = helpers.eq, helpers.clear, helpers.eval, helpers.feed, helpers.nvim @@ -120,12 +116,22 @@ describe('system()', function() it('returns the program output', function() eq("echoed", eval('system("echo -n echoed")')) end) + it('to backgrounded command does not crash', function() + -- This is indeterminate, just exercise the codepath. + eval('system("echo -n echoed &")') + eq(2, eval("1+1")) -- Still alive? + end) end) describe('passing input', function() it('returns the program output', function() eq("input", eval('system("cat -", "input")')) end) + it('to backgrounded command does not crash', function() + -- This is indeterminate, just exercise the codepath. + eval('system("cat - &", "input")') + eq(2, eval("1+1")) -- Still alive? + end) end) describe('passing a lot of input', function() diff --git a/test/functional/shell/bang_filter_spec.lua b/test/functional/ex_cmds/bang_filter_spec.lua index a320e6d018..a320e6d018 100644 --- a/test/functional/shell/bang_filter_spec.lua +++ b/test/functional/ex_cmds/bang_filter_spec.lua diff --git a/test/functional/dict_notifications_spec.lua b/test/functional/ex_cmds/dict_notifications_spec.lua index dc87312911..dc87312911 100644 --- a/test/functional/dict_notifications_spec.lua +++ b/test/functional/ex_cmds/dict_notifications_spec.lua |