Merge #10706 from janlazo/vim-8.1.1465

vim-patch:8.1.{1465,1467}
This commit is contained in:
Justin M. Keyes 2019-08-09 23:32:23 +02:00 committed by GitHub
commit 5aa97937e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ test_mf_hash(void)
assert(mf_hash_find(&ht, key) == NULL);
/* allocate and add new item */
item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);
item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);
assert(item != NULL);
item->mhi_key = key;
mf_hash_add_item(&ht, item);

View File

@ -123,8 +123,8 @@ func Test_cscopeWithCscopeConnections()
if cs_version >= 15.8
for cmd in ['cs find a item', 'cs find 9 item']
let a = execute(cmd)
call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);'], split(a, '\n', 1))
call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(mf_hashtab_T), FALSE);', getline('.'))
call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);'], split(a, '\n', 1))
call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);', getline('.'))
cnext
call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
cnext