diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-02-27 09:59:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 09:59:58 +0100 |
commit | e502cca010357773252c686ef535bb2998aeb50b (patch) | |
tree | 8533cb3229c0de3e8e99b9ce1aff5660fa91277a /test/functional/terminal/ex_terminal_spec.lua | |
parent | 73a054d84427191f70ea59fc6dc34314b28ad07c (diff) | |
parent | c484323dc67fbca10a2f3da3d6e65efdb3c678c3 (diff) | |
download | rneovim-e502cca010357773252c686ef535bb2998aeb50b.tar.gz rneovim-e502cca010357773252c686ef535bb2998aeb50b.tar.bz2 rneovim-e502cca010357773252c686ef535bb2998aeb50b.zip |
Merge #6142 from justinmk/term-modifiable
terminal: 'modifiable'; 'scrollback'; follow output only if cursor is on last line
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 7c391db18c..7a9d2a9b36 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -20,26 +20,34 @@ describe(':terminal', function() source([[ echomsg "msg1" echomsg "msg2" + echomsg "msg3" ]]) -- Invoke a command that emits frequent terminal activity. execute([[terminal while true; do echo X; done]]) helpers.feed([[<C-\><C-N>]]) - screen:expect([[ - X | - X | - ^X | - | - ]]) + wait() helpers.sleep(10) -- Let some terminal activity happen. execute("messages") screen:expect([[ - X | msg1 | msg2 | + msg3 | Press ENTER or type command to continue^ | ]]) end) + it("in normal-mode :split does not move cursor", function() + execute([[terminal while true; do echo foo; sleep .1; done]]) + helpers.feed([[<C-\><C-N>M]]) -- move cursor away from last line + wait() + eq(3, eval("line('$')")) -- window height + eq(2, eval("line('.')")) -- cursor is in the middle + execute('vsplit') + eq(2, eval("line('.')")) -- cursor stays where we put it + execute('split') + eq(2, eval("line('.')")) -- cursor stays where we put it + end) + end) describe(':terminal (with fake shell)', function() |