]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1062: some test function names do not match what they are doing 11707/head v9.0.1062
authorzeertzjq <zeertzjq@outlook.com>
Thu, 15 Dec 2022 13:48:30 +0000 (13:48 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 15 Dec 2022 13:48:30 +0000 (13:48 +0000)
Problem:    Some test function names do not match what they are doing.
Solution:   Leave out user data for the test that is called "NoUserData".
            (closes #11703)

src/testdir/test_ins_complete.vim
src/version.c

index 582824f1c734c5915df771c1dc5d3b9494e146fd..1452e4d31ba3f9bbed1e8e41d18b94bd8cb66df6 100644 (file)
@@ -236,7 +236,7 @@ func s:CompleteDone_CompleteFuncDict( findstart, base )
              \ 'menu': 'extra text',
              \ 'info': 'words are cool',
              \ 'kind': 'W',
-             \ 'user_data': 'test'
+             \ 'user_data': ['one', 'two']
            \ }
          \ ]
        \ }
@@ -252,7 +252,7 @@ func s:CompleteDone_CheckCompletedItemDict(pre)
   call assert_equal( 'extra text',     v:completed_item[ 'menu' ] )
   call assert_equal( 'words are cool', v:completed_item[ 'info' ] )
   call assert_equal( 'W',              v:completed_item[ 'kind' ] )
-  call assert_equal( 'test',           v:completed_item[ 'user_data' ] )
+  call assert_equal( ['one', 'two'],   v:completed_item[ 'user_data' ] )
 
   if a:pre
     call assert_equal('function', complete_info().mode)
@@ -285,7 +285,7 @@ func Test_CompleteDoneDict()
   execute "normal a\<C-X>\<C-U>\<C-Y>"
   set completefunc&
 
-  call assert_equal('test', v:completed_item[ 'user_data' ])
+  call assert_equal(['one', 'two'], v:completed_item[ 'user_data' ])
   call assert_true(s:called_completedone)
 
   let s:called_completedone = 0
@@ -305,7 +305,6 @@ func s:CompleteDone_CompleteFuncDictNoUserData(findstart, base)
              \ 'menu': 'extra text',
              \ 'info': 'words are cool',
              \ 'kind': 'W',
-             \ 'user_data': ['one', 'two'],
            \ }
          \ ]
        \ }
@@ -317,7 +316,7 @@ func s:CompleteDone_CheckCompletedItemDictNoUserData()
   call assert_equal( 'extra text',     v:completed_item[ 'menu' ] )
   call assert_equal( 'words are cool', v:completed_item[ 'info' ] )
   call assert_equal( 'W',              v:completed_item[ 'kind' ] )
-  call assert_equal( ['one', 'two'],   v:completed_item[ 'user_data' ] )
+  call assert_equal( '',               v:completed_item[ 'user_data' ] )
 
   let s:called_completedone = 1
 endfunc
@@ -329,7 +328,7 @@ func Test_CompleteDoneDictNoUserData()
   execute "normal a\<C-X>\<C-U>\<C-Y>"
   set completefunc&
 
-  call assert_equal(['one', 'two'], v:completed_item[ 'user_data' ])
+  call assert_equal('', v:completed_item[ 'user_data' ])
   call assert_true(s:called_completedone)
 
   let s:called_completedone = 0
index 8250a919b41ad9f99eb2071ea2708d0e35b02655..097c0a6a23147df0dcdd9e6b3f62a0fd9a79b4e8 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1062,
 /**/
     1061,
 /**/