patch 8.2.0299: Vim9: ISN_STORE with argument not tested
Problem: Vim9: ISN_STORE with argument not tested. Some cases in tv2bool()
not tested.
Solution: Add tests. Add test_unknown() and test_void().
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index c608a5d..cf3dd8c 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -221,6 +221,23 @@
\, res)
enddef
+
+def FuncWithDefault(arg: string = 'default'): string
+ return arg
+enddef
+
+def Test_disassemble_call_default()
+ let res = execute('disass FuncWithDefault')
+ assert_match('FuncWithDefault.*'
+ \ .. '\d PUSHS "default".*'
+ \ .. '\d STORE arg\[-1].*'
+ \ .. 'return arg.*'
+ \ .. '\d LOAD arg\[-1].*'
+ \ .. '\d RETURN.*'
+ \, res)
+enddef
+
+
def HasEval()
if has("eval")
echo "yes"
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 312d633..a5b6e44 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -765,6 +765,23 @@
assert_equal(false, ![2])
assert_equal(true, !!'asdf')
assert_equal(true, !![2])
+
+ assert_equal(true, !test_null_partial())
+ assert_equal(false, !{-> 'yes'})
+
+ assert_equal(true, !test_null_dict())
+ assert_equal(true, !{})
+ assert_equal(false, !{'yes': 'no'})
+
+ assert_equal(true, !test_null_job())
+ assert_equal(true, !test_null_channel())
+
+ assert_equal(true, !test_null_blob())
+ assert_equal(true, !0z)
+ assert_equal(false, !0z01)
+
+ assert_equal(true, !test_void())
+ assert_equal(true, !test_unknown())
enddef
func Test_expr7_fails()