mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1163
Problem: Expressions "0 + v:true" and "'' . v:true" cause an error.
Solution: Return something sensible when using a special variable as a
number or as a string. (suggested by Damien)
17a13437c9
Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
This commit is contained in:
parent
e2466d84bc
commit
7b8fcf0234
@ -1156,6 +1156,16 @@ func Test_type()
|
||||
call assert_equal(v:t_list, type(v:_null_list))
|
||||
call assert_equal(v:t_dict, type(v:_null_dict))
|
||||
call assert_equal(v:t_blob, type(v:_null_blob))
|
||||
|
||||
call assert_equal(0, 0 + v:false)
|
||||
call assert_equal(1, 0 + v:true)
|
||||
" call assert_equal(0, 0 + v:none)
|
||||
call assert_equal(0, 0 + v:null)
|
||||
|
||||
call assert_equal('false', '' . v:false)
|
||||
call assert_equal('true', '' . v:true)
|
||||
" call assert_equal('none', '' . v:none)
|
||||
call assert_equal('null', '' . v:null)
|
||||
endfunc
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user