Mercurial > vim
changeset 32337:a5c73a0f3d35 v9.0.1500
patch 9.0.1500: The falsy operator is not tested properly
Commit: https://github.com/vim/vim/commit/58a44751cec55be1ace0d4be5367dc19bc56be5d
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Apr 30 15:29:56 2023 +0100
patch 9.0.1500: The falsy operator is not tested properly
Problem: The falsy operator is not tested properly.
Solution: Add a few more test cases. (closes https://github.com/vim/vim/issues/12319)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Apr 2023 16:45:04 +0200 |
parents | f3c9704e69cc |
children | 612a261c3743 |
files | src/testdir/test_expr.vim src/version.c |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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