From 68cd18eb0413534807f75a45bb3008c9f2b52947 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 16 Aug 2018 12:56:14 -0400 Subject: 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 --- src/nvim/testdir/test_cmdline.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') 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 endfunc +func Test_getcmdwintype() + call feedkeys("q/:let a = getcmdwintype()\:q\", 'x!') + call assert_equal('/', a) + + call feedkeys("q?:let a = getcmdwintype()\:q\", 'x!') + call assert_equal('?', a) + + call feedkeys("q::let a = getcmdwintype()\:q\", 'x!') + call assert_equal(':', a) + + call feedkeys(":\:let a = getcmdwintype()\:q\", 'x!') + call assert_equal(':', a) + + call assert_equal('', getcmdwintype()) +endfunc + func Test_verbosefile() set verbosefile=Xlog echomsg 'foo' -- cgit