diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-02 13:13:30 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-02 13:13:30 +0000 |
commit | c6e9d7063d275139d3c207435d293271c8b556ab (patch) | |
tree | 0ebcf48be9c54b8201167e854ea633563fec624c /src/testdir/test_vimscript.vim | |
parent | f6b0c79742727948edee78cb1a3a9a4e3be8b0fd (diff) |
patch 8.2.4489: failing test for comparing v:null with numberv8.2.4489
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.
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r-- | src/testdir/test_vimscript.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index f497498ba9..24dfd1b23f 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -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) |