aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-10-29 10:06:05 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-10-29 10:06:05 -0300
commit58962d89c8db631c04c35f84ca19eaf2c82b0059 (patch)
treebac981b93194b61b149e2e5a15baa5f95f5c852c /test/functional
parent98b5ec565b955687ad7e2914378d999975b841df (diff)
parentc2185833e83f05f7e252b40e56fbd5417e30cfd4 (diff)
downloadrneovim-58962d89c8db631c04c35f84ca19eaf2c82b0059.tar.gz
rneovim-58962d89c8db631c04c35f84ca19eaf2c82b0059.tar.bz2
rneovim-58962d89c8db631c04c35f84ca19eaf2c82b0059.zip
Merge PR #3546 'Fix some regressions'
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/terminal/tui_spec.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index d38bedcd4a..0c4b80fdd2 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -149,3 +149,27 @@ describe('tui', function()
]])
end)
end)
+
+describe('tui with non-tty file descriptors', function()
+ before_each(helpers.clear)
+
+ after_each(function()
+ os.remove('testF') -- ensure test file is removed
+ end)
+
+ it('can handle pipes as stdout and stderr', function()
+ local screen = thelpers.screen_setup(0, '"'..helpers.nvim_prog..' -u NONE -i NONE --cmd \'set noswapfile\' --cmd \'normal iabc\' > /dev/null 2>&1 && cat testF && rm testF"')
+ screen:set_default_attr_ids({})
+ screen:set_default_attr_ignore(true)
+ feed(':w testF\n:q\n')
+ screen:expect([[
+ :w testF |
+ :q |
+ abc |
+ |
+ [Program exited, press any key to close] |
+ |
+ -- TERMINAL -- |
+ ]])
+ end)
+end)