From c1edd0799000956b8bd23cbc49a4b015e117879e Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Fri, 18 Sep 2015 21:17:06 -0300 Subject: shell: Ensure silent bang mappings won't cut output Setting `msg_didout` after `call_shell` is enough as it will cause `hit_return_msg()` to print on next line. Close #3269 --- test/functional/shell/bang_filter_spec.lua | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test/functional/shell/bang_filter_spec.lua (limited to 'test/functional/shell') diff --git a/test/functional/shell/bang_filter_spec.lua b/test/functional/shell/bang_filter_spec.lua new file mode 100644 index 0000000000..964dbd1029 --- /dev/null +++ b/test/functional/shell/bang_filter_spec.lua @@ -0,0 +1,49 @@ +-- Specs for bang/filter commands + +local helpers = require('test.functional.helpers') +local feed, execute, clear = helpers.feed, helpers.execute, helpers.clear +local mkdir, write_file, rmdir = helpers.mkdir, helpers.write_file, helpers.rmdir + +local Screen = require('test.functional.ui.screen') + + +describe('issues', function() + local screen + + before_each(function() + clear() + rmdir('bang_filter_spec') + mkdir('bang_filter_spec') + write_file('bang_filter_spec/f1', 'f1') + write_file('bang_filter_spec/f2', 'f2') + write_file('bang_filter_spec/f3', 'f3') + screen = Screen.new() + screen:attach() + end) + + after_each(function() + rmdir('bang_filter_spec') + end) + + it('#3269 Last line of shell output is not truncated', function() + execute([[nnoremap \l :!ls bang_filter_spec]]) + feed([[\l]]) + screen:expect([[ + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + :!ls bang_filter_spec | + | + f1 | + f2 | + f3 | + Press ENTER or type command to continue^ | + ]]) + end) + +end) -- cgit