aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-11-21 23:04:02 -0700
committerMichael Ennen <mike.ennen@gmail.com>2016-11-29 15:02:24 -0700
commit5efcefee8703a8d1d3c33e0773d3e234e42a2293 (patch)
treed21f379fab17118e9ca2cdcef14e8b8f27471f43 /src/nvim/testdir
parent3979c6cbed6399934a06da35881e4d351c588af0 (diff)
downloadrneovim-5efcefee8703a8d1d3c33e0773d3e234e42a2293.tar.gz
rneovim-5efcefee8703a8d1d3c33e0773d3e234e42a2293.tar.bz2
rneovim-5efcefee8703a8d1d3c33e0773d3e234e42a2293.zip
vim-patch:7.4.2071
Problem: The return value of type() is difficult to use. Solution: Define v:t_ constants. (Ken Takata) https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_viml.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_viml.vim b/src/nvim/testdir/test_viml.vim
index c39c5e6b28..a11d62f5cf 100644
--- a/src/nvim/testdir/test_viml.vim
+++ b/src/nvim/testdir/test_viml.vim
@@ -949,6 +949,14 @@ func Test_type()
call assert_equal(6, type(v:false))
call assert_equal(6, type(v:true))
call assert_equal(7, type(v:null))
+ call assert_equal(v:t_number, type(0))
+ call assert_equal(v:t_string, type(""))
+ call assert_equal(v:t_func, type(function("tr")))
+ call assert_equal(v:t_list, type([]))
+ call assert_equal(v:t_dict, type({}))
+ call assert_equal(v:t_float, type(0.0))
+ call assert_equal(v:t_bool, type(v:false))
+ call assert_equal(v:t_bool, type(v:true))
endfunc
"-------------------------------------------------------------------------------