From 6a00b1689653546f0469d7f449b3709430f5883b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 7 Feb 2022 05:34:20 +0800 Subject: vim-patch:7.4.1164 Problem: No tests for comparing special variables. Error in jsondecode() not reported. test_json does not work Japanse system. Solution: Set scriptencoding. (Ken Takata) Add a few more tests. Add error. https://github.com/vim/vim/commit/6039c7f05376f0e470cf62bf2757e653aea357f3 Code is N/A. This only ports the tests. Comment out tests involving v:none as Nvim has removed it. --- src/nvim/testdir/test_vimscript.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index c3e882ad05..fc95d70a88 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -1166,6 +1166,18 @@ func Test_type() call assert_equal('true', '' . v:true) " call assert_equal('none', '' . v:none) call assert_equal('null', '' . v:null) + + call assert_true(v:false == 0) + call assert_false(v:false != 0) + call assert_true(v:true == 1) + call assert_false(v:true != 1) + call assert_false(v:true == v:false) + call assert_true(v:true != v:false) + + call assert_true(v:null == 0) + call assert_false(v:null != 0) + " call assert_true(v:none == 0) + " call assert_false(v:none != 0) endfunc "------------------------------------------------------------------------------- -- cgit