Patch 9.0.1361
Problem:    extendnew() not sufficiently tested.
Solution:   Add a few more test cases for extendnew(). (closes #12075)
Files:      src/testdir/test_listdict.vim


*** ../vim-9.0.1360/src/testdir/test_listdict.vim       2022-09-28 
13:22:53.942530974 +0100
--- src/testdir/test_listdict.vim       2023-02-27 14:58:31.642038438 +0000
***************
*** 1238,1248 ****
    let l = [1, 2, 3]
    call assert_equal([1, 2, 3, 4, 5], extendnew(l, [4, 5]))
    call assert_equal([1, 2, 3], l)
  
!   " Test extend() 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)
  endfunc
  
  func s:check_scope_dict(x, fixed)
--- 1238,1252 ----
    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 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)
*** ../vim-9.0.1360/src/version.c       2023-02-27 14:32:05.125980422 +0000
--- src/version.c       2023-02-27 14:57:11.713993705 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1361,
  /**/

-- 
A computer program does what you tell it to do, not what you want it to do.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230227150023.CECA11C0B1F%40moolenaar.net.

Raspunde prin e-mail lui