aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shell/viml_system_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2014-12-02 16:50:58 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2014-12-02 16:53:16 +0100
commitb3151af69ca545e7eac3824d6101b7b8b5701b82 (patch)
treec6a2526e98e33239bed8b1c40758021ed1197bab /test/functional/shell/viml_system_spec.lua
parent1464b0eda20594f3ae99418e809038c92f470f35 (diff)
downloadrneovim-b3151af69ca545e7eac3824d6101b7b8b5701b82.tar.gz
rneovim-b3151af69ca545e7eac3824d6101b7b8b5701b82.tar.bz2
rneovim-b3151af69ca545e7eac3824d6101b7b8b5701b82.zip
systemlist: test empty lines in beginning and middle of output
Diffstat (limited to 'test/functional/shell/viml_system_spec.lua')
-rw-r--r--test/functional/shell/viml_system_spec.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua
index 29cbff66b7..48dc518d7b 100644
--- a/test/functional/shell/viml_system_spec.lua
+++ b/test/functional/shell/viml_system_spec.lua
@@ -188,6 +188,16 @@ describe('systemlist()', function()
end)
end)
+ describe('handles empty lines', function()
+ it('in the middle', function()
+ eq({'line one','','line two'}, eval("systemlist('cat',['line one','','line two'])"))
+ end)
+
+ it('in the beginning', function()
+ eq({'','line one','line two'}, eval("systemlist('cat',['','line one','line two'])"))
+ end)
+ end)
+
describe('when keepempty option is', function()
it('0, ignores trailing newline', function()
eq({'aa','bb'}, eval("systemlist('cat',['aa','bb'],0)"))