diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-09-18 21:17:06 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-10-01 15:22:48 -0300 |
commit | c1edd0799000956b8bd23cbc49a4b015e117879e (patch) | |
tree | 28d43fba1b4830b0c297311431cedcfda637ae71 /test | |
parent | afe8a32be01d006d6c25f69b4aa1b6e92464ab63 (diff) | |
download | rneovim-c1edd0799000956b8bd23cbc49a4b015e117879e.tar.gz rneovim-c1edd0799000956b8bd23cbc49a4b015e117879e.tar.bz2 rneovim-c1edd0799000956b8bd23cbc49a4b015e117879e.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/helpers.lua | 1 | ||||
-rw-r--r-- | test/functional/shell/bang_filter_spec.lua | 49 |
2 files changed, 50 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 9cd1fd7ab3..80cb1e5ce3 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -372,5 +372,6 @@ return { set_session = set_session, write_file = write_file, rmdir = rmdir, + mkdir = lfs.mkdir, exc_exec = exc_exec, } 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 <silent>\l :!ls bang_filter_spec<cr>]]) + feed([[\l]]) + screen:expect([[ + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + :!ls bang_filter_spec | + | + f1 | + f2 | + f3 | + Press ENTER or type command to continue^ | + ]]) + end) + +end) |