From: Bram Moolenaar Date: Sat, 23 Jun 2018 12:55:03 +0000 (+0200) Subject: patch 8.1.0101: no test for getcmdwintype() X-Git-Tag: v8.1.0101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81612b7a7dc50a6c0da9f42fa48f1f576a4ad616;p=vim patch 8.1.0101: no test for getcmdwintype() Problem: No test for getcmdwintype(). Solution: Add a test. (Dominique Pelle, closes #3068) --- 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 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 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, /**/