To: vim_dev@googlegroups.com Subject: Patch 8.0.0306 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0306 Problem: mode() not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan) Files: src/testdir/test_functions.vim *** ../vim-8.0.0305/src/testdir/test_functions.vim 2017-02-01 17:24:29.681328124 +0100 --- src/testdir/test_functions.vim 2017-02-05 13:46:26.547402404 +0100 *************** *** 320,358 **** --- 320,392 ---- 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)) *** ../vim-8.0.0305/src/version.c 2017-02-05 14:13:12.152033013 +0100 --- src/version.c 2017-02-05 14:14:03.375670407 +0100 *************** *** 766,767 **** --- 766,769 ---- { /* Add new patch number below this line */ + /**/ + 306, /**/ -- There are only two hard things in programming: Cache invalidation, naming things and off-by-one errors. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///