1
0
forked from aniani/vim

patch 8.2.4489: failing test for comparing v:null with number

Problem:    Failing test for comparing v:null with number.
Solution:   Allow comparing v:null with number in legacy script.
            (Ken Takata, closes #9873)  Also do this for float.
This commit is contained in:
Bram Moolenaar
2022-03-02 13:13:30 +00:00
parent f6b0c79742
commit c6e9d7063d
3 changed files with 18 additions and 0 deletions

View File

@@ -6546,9 +6546,16 @@ func Test_type()
call assert_true(v:true != v:false)
call assert_true(v:null == 0)
call assert_false(v:null == 1)
call assert_false(v:null != 0)
call assert_true(v:none == 0)
call assert_false(v:none == 1)
call assert_false(v:none != 0)
if has('float')
call assert_true(v:null == 0.0)
call assert_false(v:null == 0.1)
call assert_false(v:null != 0.0)
endif
call assert_true(v:false is v:false)
call assert_true(v:true is v:true)