]> granicus.if.org Git - vim/commitdiff
patch 8.2.4581: null types not fully tested v8.2.4581
authorBram Moolenaar <Bram@vim.org>
Wed, 16 Mar 2022 17:56:33 +0000 (17:56 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 16 Mar 2022 17:56:33 +0000 (17:56 +0000)
Problem:    Null types not fully tested.
Solution:   Add some more tests using null types.

src/testdir/test_vim9_expr.vim
src/version.c

index 83cdab134d5852dd4c762f21259c44feec061477..02ea54ada65d00116c4e58b20f043c14a0b723ba 100644 (file)
@@ -2091,6 +2091,11 @@ def Test_expr8_list()
       var llstring: list<list<string>> = [['text'], []]
       llstring = [[], ['text']]
       llstring = [[], []]
+
+      var ls = [null_string]
+      assert_equal('list<string>', typename(ls))
+      var lb = [null_blob]
+      assert_equal('list<blob>', typename(lb))
   END
   v9.CheckDefAndScriptSuccess(lines)
 
@@ -2608,6 +2613,11 @@ def Test_expr8_dict()
       # comment to start fold is OK
       var x1: number #{{ fold
       var x2 = 9 #{{ fold
+
+      var ds = {k: null_string}
+      assert_equal('dict<string>', typename(ds))
+      var dl = {a: null_list}
+      assert_equal('dict<list<unknown>>', typename(dl))
   END
   v9.CheckDefAndScriptSuccess(lines)
  
index fe974f6e945ac33f32a6f1a78f1a6078b962532c..fd632792269075e3baee4b1ef9f1f7303756b968 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4581,
 /**/
     4580,
 /**/