Skip to content

Commit

Permalink
patch 9.0.1361: extendnew() not sufficiently tested
Browse files Browse the repository at this point in the history
Problem:    extendnew() not sufficiently tested.
Solution:   Add a few more test cases for extendnew(). (closes #12075)
  • Loading branch information
zeertzjq authored and brammool committed Feb 27, 2023
1 parent 80c5b2c commit 341f387
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/testdir/test_listdict.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1238,11 +1238,15 @@ func Test_listdict_extendnew()
let l = [1, 2, 3]
call assert_equal([1, 2, 3, 4, 5], extendnew(l, [4, 5]))
call assert_equal([1, 2, 3], l)
lockvar l
call assert_equal([1, 2, 3, 4, 5], extendnew(l, [4, 5]))

" Test extend() with dictionaries.
" Test extendnew() with dictionaries.
let d = {'a': {'b': 'B'}}
call assert_equal({'a': {'b': 'B'}, 'c': 'cc'}, extendnew(d, {'c': 'cc'}))
call assert_equal({'a': {'b': 'B'}}, d)
lockvar d
call assert_equal({'a': {'b': 'B'}, 'c': 'cc'}, extendnew(d, {'c': 'cc'}))
endfunc

func s:check_scope_dict(x, fixed)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1361,
/**/
1360,
/**/
Expand Down

0 comments on commit 341f387

Please sign in to comment.