diff options
Diffstat (limited to 'test/functional/terminal/ex_terminal_spec.lua')
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 707c355069..065dd72485 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -96,19 +96,28 @@ describe(':terminal', function() eq(3, #jumps) end) + it('nvim_get_mode() in :terminal', function() + command(':terminal') + eq({ blocking=false, mode='nt' }, nvim('get_mode')) + feed('i') + eq({ blocking=false, mode='t' }, nvim('get_mode')) + feed([[<C-\><C-N>]]) + eq({ blocking=false, mode='nt' }, nvim('get_mode')) + end) + it(':stopinsert RPC request exits terminal-mode #7807', function() command(':terminal') feed('i[tui] insert-mode') eq({ blocking=false, mode='t' }, nvim('get_mode')) command('stopinsert') - eq({ blocking=false, mode='n' }, nvim('get_mode')) + eq({ blocking=false, mode='nt' }, nvim('get_mode')) end) it(':stopinsert in normal mode doesn\'t break insert mode #9889', function() command(':terminal') - eq({ blocking=false, mode='n' }, nvim('get_mode')) + eq({ blocking=false, mode='nt' }, nvim('get_mode')) command(':stopinsert') - eq({ blocking=false, mode='n' }, nvim('get_mode')) + eq({ blocking=false, mode='nt' }, nvim('get_mode')) feed('a') eq({ blocking=false, mode='t' }, nvim('get_mode')) end) |