# HG changeset patch # User Christian Brabandt # Date 1529758805 -7200 # Node ID 3ca818b65cde2cea4833e9bd7dcfacf570d7f090 # Parent 4a570c13f750b16ab4d37dd70414bf8fe7bf12a6 patch 8.1.0101: no test for getcmdwintype() commit https://github.com/vim/vim/commit/81612b7a7dc50a6c0da9f42fa48f1f576a4ad616 Author: Bram Moolenaar Date: Sat Jun 23 14:55:03 2018 +0200 patch 8.1.0101: no test for getcmdwintype() Problem: No test for getcmdwintype(). Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3068) diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -511,6 +511,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' diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 101, +/**/ 100, /**/ 99,