diff options
author | Scott Prager <splinterofchaos@gmail.com> | 2015-04-15 13:05:30 -0400 |
---|---|---|
committer | Scott Prager <splinterofchaos@gmail.com> | 2015-05-02 09:47:30 -0400 |
commit | 1eb33969220b267cf45adb286f0b7b6d14805eff (patch) | |
tree | 8c4e587c91bbf91748c7ace6338aa3f609eaec0f /test/functional/shell/viml_system_spec.lua | |
parent | 74aef8972048c3288a3cbd6a8dadf17a8df3c08c (diff) | |
download | rneovim-1eb33969220b267cf45adb286f0b7b6d14805eff.tar.gz rneovim-1eb33969220b267cf45adb286f0b7b6d14805eff.tar.bz2 rneovim-1eb33969220b267cf45adb286f0b7b6d14805eff.zip |
unify jobstart, termopen, and system interfaces
For any of these functions, if {cmd} is a string, execute
"&shell &shellcmdflag '{cmd}'", or simply {cmd} if it's a list.
In termopen(), if the 'name' option is not supplied, try to guess using
'{cmd}' (string) or {cmd}[0] (list). Simplify ex_terminal to use the
string form of termopen().
termopen: get name from argument
Convert list_to_argv to tv_to_argv.
Helped-by: Björn Linse <@bfredl>
Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: Thiago de Arruda <@tarruda>
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index 922770ad42..bd47d31a14 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -44,7 +44,7 @@ describe('system()', function() eq(127, eval('v:shell_error')) end) - describe('executes shell function', function() + describe('executes shell function if passed a string', function() local screen before_each(function() @@ -192,6 +192,13 @@ describe('system()', function() end) end) end + + describe('command passed as a list', function() + it('does not execute &shell', function() + eq('* $NOTHING ~/file', + eval("system(['echo', '-n', '*', '$NOTHING', '~/file'])")) + end) + end) end) describe('systemlist()', function() |