Merge pull request #5642 from Shougo/vim-7.4.1660

vim-patch:7.4.1660
This commit is contained in:
James McCoy
2016-11-23 20:49:24 -05:00
committed by GitHub
4 changed files with 18 additions and 17 deletions

View File

@@ -10658,7 +10658,7 @@ static void f_has(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (!n) {
if (STRNICMP(name, "patch", 5) == 0) {
if (name[5] == '-'
&& strlen(name) > 11
&& strlen(name) >= 11
&& ascii_isdigit(name[6])
&& ascii_isdigit(name[8])
&& ascii_isdigit(name[10])) {

View File

@@ -1,5 +1,20 @@
" Tests for expressions.
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
func Test_strgetchar()
call assert_equal(char2nr('a'), strgetchar('axb', 0))
call assert_equal(char2nr('x'), strgetchar('axb', 1))

View File

@@ -784,7 +784,7 @@ static int included_patches[] = {
1663,
// 1662 NA
// 1661 NA
// 1660,
1660,
// 1659 NA
1658,
// 1657 NA