diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-07 05:34:20 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-07 05:34:20 +0800 |
commit | 6a00b1689653546f0469d7f449b3709430f5883b (patch) | |
tree | d2095b4aa30ba0b324e05bfeaa61b1ed799f519f | |
parent | 7b8fcf0234441a7db29897d60c728ad2adb83464 (diff) | |
download | rneovim-6a00b1689653546f0469d7f449b3709430f5883b.tar.gz rneovim-6a00b1689653546f0469d7f449b3709430f5883b.tar.bz2 rneovim-6a00b1689653546f0469d7f449b3709430f5883b.zip |
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.
-rw-r--r-- | src/nvim/testdir/test_vimscript.vim | 12 |
1 files changed, 12 insertions, 0 deletions
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 "------------------------------------------------------------------------------- |