aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-05-10 23:37:48 -0700
committerMichael Ennen <mike.ennen@gmail.com>2016-05-25 00:52:38 -0700
commitb37b5a59afd1a9c8bd91ffd4e67714c3f6c47f6d (patch)
tree2afec764a6bb7d1b0d931dafeb32500bd92f4937
parent0bfc1f33a02e2ea405a2df7eee67f093b56fa997 (diff)
downloadrneovim-b37b5a59afd1a9c8bd91ffd4e67714c3f6c47f6d.tar.gz
rneovim-b37b5a59afd1a9c8bd91ffd4e67714c3f6c47f6d.tar.bz2
rneovim-b37b5a59afd1a9c8bd91ffd4e67714c3f6c47f6d.zip
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. https://github.com/vim/vim/commit/ea8c219ca852cc8eaf603b1bf475edf95e2850cf Also add Test 91 from 7.4.1157 to test_viml.vim.
-rw-r--r--src/nvim/testdir/test_viml.vim39
-rw-r--r--src/nvim/version.c2
2 files changed, 40 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_viml.vim b/src/nvim/testdir/test_viml.vim
index 9f0618bd45..2d989cdad9 100644
--- a/src/nvim/testdir/test_viml.vim
+++ b/src/nvim/testdir/test_viml.vim
@@ -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
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 81137ff1c6..d7e75ee26e 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -397,7 +397,7 @@ static int included_patches[] = {
1284,
// 1283 NA
1282,
- // 1281,
+ 1281,
// 1280 NA
// 1279 NA
// 1278 NA