diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-24 16:59:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 16:59:14 -0400 |
| commit | a282a177d3320db25fa8f854cbcdbe0bc6abde7f (patch) | |
| tree | 137f0f1babdd1fc776f4b63a275604f7c526841d /src/nvim/testdir/test_true_false.vim | |
| parent | 0a653f7ab98dfc05bf0532b9f81bc19377031900 (diff) | |
| parent | 370e65ed7cb299b49306e96f13cf6b5c7f717a6c (diff) | |
| download | rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.gz rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.tar.bz2 rneovim-a282a177d3320db25fa8f854cbcdbe0bc6abde7f.zip | |
Merge pull request #14634 from janlazo/vim-8.2.2880
vim-patch:8.2.{511,1689,1957,2880,2884}
Diffstat (limited to 'src/nvim/testdir/test_true_false.vim')
| -rw-r--r-- | src/nvim/testdir/test_true_false.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_true_false.vim b/src/nvim/testdir/test_true_false.vim index 84aca737ac..315ba188cb 100644 --- a/src/nvim/testdir/test_true_false.vim +++ b/src/nvim/testdir/test_true_false.vim @@ -1,5 +1,7 @@ " Test behavior of boolean-like values. +source check.vim + " Test what is explained at ":help TRUE" and ":help FALSE". func Test_if() if v:false @@ -41,7 +43,9 @@ func Test_if() call assert_fails('if [1]', 'E745') call assert_fails('if {1: 1}', 'E728') call assert_fails('if function("string")', 'E703') - call assert_fails('if 1.3")', 'E805') + if has('float') + call assert_fails('if 1.3")', 'E805') + endif endfunc function Try_arg_true_false(expr, false_val, true_val) @@ -113,6 +117,7 @@ func Test_true_false_arg() endfunc function Try_arg_non_zero(expr, false_val, true_val) + CheckFeature float for v in ['v:false', '0', '[1]', '{2:3}', '3.4'] let r = eval(substitute(a:expr, '%v%', v, '')) call assert_equal(a:false_val, r, 'result for ' . v . ' is not ' . a:false_val . ' but ' . r) |