summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-30 15:29:56 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-30 15:29:56 +0100
commit58a44751cec55be1ace0d4be5367dc19bc56be5d (patch)
tree0df3968547fd15f44d15138036c46fe6c4675248 /src/testdir
parentcaf642c25de526229264cab9425e7c9979f3509b (diff)
downloadvim-git-58a44751cec55be1ace0d4be5367dc19bc56be5d.tar.gz
patch 9.0.1500: The falsy operator is not tested properlyv9.0.1500
Problem: The falsy operator is not tested properly. Solution: Add a few more test cases. (closes #12319)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_expr.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index c3543676b..4e02de010 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -86,6 +86,21 @@ func Test_op_falsy()
call assert_equal(456, [] ?? 456)
call assert_equal(456, {} ?? 456)
call assert_equal(456, 0.0 ?? 456)
+
+ call assert_equal(456, v:null ?? 456)
+ call assert_equal(456, v:none ?? 456)
+ call assert_equal(456, test_null_string() ?? 456)
+ call assert_equal(456, test_null_blob() ?? 456)
+ call assert_equal(456, test_null_list() ?? 456)
+ call assert_equal(456, test_null_dict() ?? 456)
+ call assert_equal(456, test_null_function() ?? 456)
+ call assert_equal(456, test_null_partial() ?? 456)
+ if has('job')
+ call assert_equal(456, test_null_job() ?? 456)
+ endif
+ if has('channel')
+ call assert_equal(456, test_null_channel() ?? 456)
+ endif
END
call v9.CheckLegacyAndVim9Success(lines)
endfunc