]> granicus.if.org Git - vim/commitdiff
patch 7.4.1281 v7.4.1281
authorBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 18:27:53 +0000 (19:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 7 Feb 2016 18:27:53 +0000 (19:27 +0100)
Problem:    No test for skipping over code that isn't evaluated.
Solution:   Add a test with code that would fail when not skipped.

src/testdir/test_viml.vim
src/version.c

index 6c755bb534f3d899b016a860f2870f849d62907c..0120d21216359f1b9807518679bc20b75fa0d025 100644 (file)
@@ -1027,6 +1027,30 @@ func Test_type()
     call ChangeYourMind()
 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
 " vim: ts=8 sw=4 tw=80 fdm=marker
index c6e7244703450f939fbc06c7f6a4174a3f8671a3..f95be69e5c10270b8ac3f40e478208cb95a49c7b 100644 (file)
@@ -747,6 +747,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1281,
 /**/
     1280,
 /**/