From 81612b7a7dc50a6c0da9f42fa48f1f576a4ad616 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar <Bram@vim.org> Date: Sat, 23 Jun 2018 14:55:03 +0200 Subject: [PATCH] patch 8.1.0101: no test for getcmdwintype() Problem: No test for getcmdwintype(). Solution: Add a test. (Dominique Pelle, closes #3068) --- src/testdir/test_cmdline.vim | 16 ++++++++++++++++ src/version.c | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index 1caf748e1..26d33d838 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -511,6 +511,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' diff --git a/src/version.c b/src/version.c index ba3f84859..a2da37ed8 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 101, /**/ 100, /**/ -- 2.40.0