From: Bram Moolenaar Date: Sun, 5 Feb 2017 13:15:29 +0000 (+0100) Subject: patch 8.0.0306: mode() not sufficiently tested X-Git-Tag: v8.0.0306 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e971df39a5aac5d9b7e8033247dc18b12daa0eb8;p=vim patch 8.0.0306: mode() not sufficiently tested Problem: mode() not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan) --- diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index e2dcb4fb7..bd4ff0539 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -320,39 +320,73 @@ func! Test_mode() normal! 3G exe "normal i\\" call assert_equal('i-i', g:current_modes) + " i_CTRL-P: Multiple matches exe "normal i\uBa\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-P: Single match exe "normal iBro\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X exe "normal iBa\\\u" call assert_equal('i-ix', g:current_modes) + " i_CTRL-X CTRL-P: Multiple matches exe "normal iBa\\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P: Single match exe "normal iBro\\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P + CTRL-P: Single match exe "normal iBro\\\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: Multiple matches + exe "normal i\\\\u" + call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: Single match + exe "normal iBlu\\\\u" + call assert_equal('i-ic', g:current_modes) + " i_CTRL-P: No match exe "normal iCom\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-P: No match exe "normal iCom\\\\u" call assert_equal('i-ic', g:current_modes) + " i_CTRL-X CTRL-L: No match + exe "normal iabc\\\\u" + call assert_equal('i-ic', g:current_modes) + " R_CTRL-P: Multiple matches exe "normal RBa\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-P: Single match exe "normal RBro\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X exe "normal RBa\\\u" call assert_equal('R-Rx', g:current_modes) + " R_CTRL-X CTRL-P: Multiple matches exe "normal RBa\\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P: Single match exe "normal RBro\\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P + CTRL-P: Single match exe "normal RBro\\\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: Multiple matches + exe "normal R\\\\u" + call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: Single match + exe "normal RBlu\\\\u" + call assert_equal('R-Rc', g:current_modes) + " R_CTRL-P: No match exe "normal RCom\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-P: No match exe "normal RCom\\\\u" call assert_equal('R-Rc', g:current_modes) + " R_CTRL-X CTRL-L: No match + exe "normal Rabc\\\\u" + call assert_equal('R-Rc', g:current_modes) call assert_equal('n', mode(0)) call assert_equal('n', mode(1)) diff --git a/src/version.c b/src/version.c index 78cb27fe6..e0fa3cb39 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 306, /**/ 305, /**/