Skip to content

Commit ea8c219

Browse files
committed
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.
1 parent eba6d8c commit ea8c219

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/testdir/test_viml.vim

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,30 @@ func Test_type()
10271027
call ChangeYourMind()
10281028
endfunc
10291029

1030+
"-------------------------------------------------------------------------------
1031+
" Test 92: skipping code {{{1
1032+
"-------------------------------------------------------------------------------
1033+
1034+
func Test_skip()
1035+
let Fn = function('Test_type')
1036+
call assert_false(0 && Fn[1])
1037+
call assert_false(0 && string(Fn))
1038+
call assert_false(0 && len(Fn))
1039+
let l = []
1040+
call assert_false(0 && l[1])
1041+
call assert_false(0 && string(l))
1042+
call assert_false(0 && len(l))
1043+
let f = 1.0
1044+
call assert_false(0 && f[1])
1045+
call assert_false(0 && string(f))
1046+
call assert_false(0 && len(f))
1047+
let sp = v:null
1048+
call assert_false(0 && sp[1])
1049+
call assert_false(0 && string(sp))
1050+
call assert_false(0 && len(sp))
1051+
1052+
endfunc
1053+
10301054
"-------------------------------------------------------------------------------
10311055
" Modelines {{{1
10321056
" vim: ts=8 sw=4 tw=80 fdm=marker

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1281,
750752
/**/
751753
1280,
752754
/**/

0 commit comments

Comments
 (0)