vim-patch:7.4.1281

Problem:    No test for skipping over code that isn't evaluated.
Solution:   Add a test with code that would fail when not skipped.

ea8c219ca8

Also add Test 91 from 7.4.1157 to test_viml.vim.
This commit is contained in:
Michael Ennen 2016-05-10 23:37:48 -07:00
parent 0bfc1f33a0
commit b37b5a59af
2 changed files with 40 additions and 1 deletions

View File

@ -922,6 +922,45 @@ func Test_curlies()
call assert_equal(77, g:a['t'])
endfunc
"-------------------------------------------------------------------------------
" Test 91: using type(). {{{1
"-------------------------------------------------------------------------------
func Test_type()
call assert_equal(0, type(0))
call assert_equal(1, type(""))
call assert_equal(2, type(function("tr")))
call assert_equal(3, type([]))
call assert_equal(4, type({}))
call assert_equal(5, type(0.0))
call assert_equal(6, type(v:false))
call assert_equal(6, type(v:true))
call assert_equal(7, type(v:null))
endfunc
"-------------------------------------------------------------------------------
" Test 92: skipping code {{{1
"-------------------------------------------------------------------------------
func Test_skip()
let Fn = function('Test_type')
call assert_false(0 && Fn[1])
call assert_false(0 && string(Fn))
call assert_false(0 && len(Fn))
let l = []
call assert_false(0 && l[1])
call assert_false(0 && string(l))
call assert_false(0 && len(l))
let f = 1.0
call assert_false(0 && f[1])
call assert_false(0 && string(f))
call assert_false(0 && len(f))
let sp = v:null
call assert_false(0 && sp[1])
call assert_false(0 && string(sp))
call assert_false(0 && len(sp))
endfunc
"-------------------------------------------------------------------------------
" Modelines {{{1

View File

@ -397,7 +397,7 @@ static int included_patches[] = {
1284,
// 1283 NA
1282,
// 1281,
1281,
// 1280 NA
// 1279 NA
// 1278 NA