summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_functions.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r--src/testdir/test_functions.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index ab1dbf3b59..654d9125bf 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -935,9 +935,19 @@ func Test_mode()
if has('terminal')
term
+ " Terminal-Job mode
+ call assert_equal('t', mode())
+ call assert_equal('t', mode(1))
+ call feedkeys("\<C-W>:echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt')
+ call assert_equal("c-ct", g:current_modes)
+ call feedkeys("\<Esc>", 'xt')
+
+ " Terminal-Normal mode
call feedkeys("\<C-W>N", 'xt')
call assert_equal('n', mode())
call assert_equal('nt', mode(1))
+ call feedkeys(":echo \<C-R>=Save_mode()\<C-U>\<CR>", 'xt')
+ call assert_equal("c-c", g:current_modes)
call feedkeys("aexit\<CR>", 'xt')
endif