aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 12:56:14 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-16 12:56:51 -0400
commit68cd18eb0413534807f75a45bb3008c9f2b52947 (patch)
treee21cbb2f64fc9f95c6478ea9f8abe9b0bfb78fd7 /src
parent14b148f0adbdb339d98ae293929949bffa7fa94b (diff)
downloadrneovim-68cd18eb0413534807f75a45bb3008c9f2b52947.tar.gz
rneovim-68cd18eb0413534807f75a45bb3008c9f2b52947.tar.bz2
rneovim-68cd18eb0413534807f75a45bb3008c9f2b52947.zip
vim-patch:8.1.0101: no test for getcmdwintype()
Problem: No test for getcmdwintype(). Solution: Add a test. (Dominique Pelle, closes vim/vim#3068) https://github.com/vim/vim/commit/81612b7a7dc50a6c0da9f42fa48f1f576a4ad616
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_cmdline.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 02c44ee6cb..1b7bd83b3c 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -461,6 +461,22 @@ func Test_getcmdtype()
cunmap <F6>
endfunc
+func Test_getcmdwintype()
+ call feedkeys("q/:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
+ call assert_equal('/', a)
+
+ call feedkeys("q?:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
+ call assert_equal('?', a)
+
+ call feedkeys("q::let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
+ call assert_equal(':', a)
+
+ call feedkeys(":\<C-F>:let a = getcmdwintype()\<CR>:q\<CR>", 'x!')
+ call assert_equal(':', a)
+
+ call assert_equal('', getcmdwintype())
+endfunc
+
func Test_verbosefile()
set verbosefile=Xlog
echomsg 'foo'