Skip to content

Commit 341f387

Browse files
zeertzjqbrammool
authored andcommitted
patch 9.0.1361: extendnew() not sufficiently tested
Problem: extendnew() not sufficiently tested. Solution: Add a few more test cases for extendnew(). (closes #12075)
1 parent 80c5b2c commit 341f387

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/testdir/test_listdict.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,11 +1238,15 @@ func Test_listdict_extendnew()
12381238
let l = [1, 2, 3]
12391239
call assert_equal([1, 2, 3, 4, 5], extendnew(l, [4, 5]))
12401240
call assert_equal([1, 2, 3], l)
1241+
lockvar l
1242+
call assert_equal([1, 2, 3, 4, 5], extendnew(l, [4, 5]))
12411243

1242-
" Test extend() with dictionaries.
1244+
" Test extendnew() with dictionaries.
12431245
let d = {'a': {'b': 'B'}}
12441246
call assert_equal({'a': {'b': 'B'}, 'c': 'cc'}, extendnew(d, {'c': 'cc'}))
12451247
call assert_equal({'a': {'b': 'B'}}, d)
1248+
lockvar d
1249+
call assert_equal({'a': {'b': 'B'}, 'c': 'cc'}, extendnew(d, {'c': 'cc'}))
12461250
endfunc
12471251

12481252
func s:check_scope_dict(x, fixed)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1361,
698700
/**/
699701
1360,
700702
/**/

0 commit comments

Comments
 (0)