Patch 7.4.1660
Problem:    has('patch-7.4.1') doesn't work.
Solution:   Fix off-by-one error. (Thinca)
Files:      src/eval.c, src/testdir/test_expr.vim, src/testdir/test60.in,
            src/testdir/test60.ok


*** ../vim-7.4.1659/src/eval.c  2016-03-26 20:59:48.107431656 +0100
--- src/eval.c  2016-03-26 21:18:12.532183470 +0100
***************
*** 13838,13844 ****
        if (STRNICMP(name, "patch", 5) == 0)
        {
            if (name[5] == '-'
!                   && STRLEN(name) > 11
                    && vim_isdigit(name[6])
                    && vim_isdigit(name[8])
                    && vim_isdigit(name[10]))
--- 13838,13844 ----
        if (STRNICMP(name, "patch", 5) == 0)
        {
            if (name[5] == '-'
!                   && STRLEN(name) >= 11
                    && vim_isdigit(name[6])
                    && vim_isdigit(name[8])
                    && vim_isdigit(name[10]))
*** ../vim-7.4.1659/src/testdir/test_expr.vim   2016-03-19 19:37:56.069824594 
+0100
--- src/testdir/test_expr.vim   2016-03-26 21:23:49.624748191 +0100
***************
*** 21,23 ****
--- 21,38 ----
  
    call assert_fails('echo base.method > instance.method')
  endfunc
+ 
+ func Test_version()
+   call assert_true(has('patch-7.4.001'))
+   call assert_true(has('patch-7.4.01'))
+   call assert_true(has('patch-7.4.1'))
+   call assert_true(has('patch-6.9.999'))
+   call assert_true(has('patch-7.1.999'))
+   call assert_true(has('patch-7.4.123'))
+ 
+   call assert_false(has('patch-7'))
+   call assert_false(has('patch-7.4'))
+   call assert_false(has('patch-7.4.'))
+   call assert_false(has('patch-9.1.0'))
+   call assert_false(has('patch-9.9.1'))
+ endfunc
*** ../vim-7.4.1659/src/testdir/test60.in       2014-04-01 22:08:51.016677463 
+0200
--- src/testdir/test60.in       2016-03-26 21:21:08.330392133 +0100
***************
*** 589,603 ****
  endfunction
  :call TestExists()
  :"
- :function TestHas()
-   redir >> test.out
-   for pl in ['6.9.999', '7.1.999', '7.4.123', '9.1.0', '9.9.1']
-     echo 'has patch ' . pl . ': ' . has('patch-' . pl)
-   endfor
-   redir END
- endfunc
- :call TestHas()
- :"
  :delfunc TestExists
  :delfunc RunTest
  :delfunc TestFuncArg
--- 589,594 ----
*** ../vim-7.4.1659/src/testdir/test60.ok       2014-04-01 22:08:51.016677463 
+0200
--- src/testdir/test60.ok       2016-03-26 21:21:02.578450751 +0100
***************
*** 204,211 ****
   g:footest#x = 1
     footest#F() 0
  UndefFun() 0
- has patch 6.9.999: 1
- has patch 7.1.999: 1
- has patch 7.4.123: 1
- has patch 9.1.0: 0
- has patch 9.9.1: 0
--- 204,206 ----
*** ../vim-7.4.1659/src/version.c       2016-03-26 21:04:44.068416801 +0100
--- src/version.c       2016-03-26 21:13:28.939072213 +0100
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1660,
  /**/

-- 
Birthdays are healthy.  The more you have them, the longer you live.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui