Patch 8.2.3982
Problem:    Some lines of code not covered by tests.
Solution:   Add a few more test cases. (Dominique Pellé, closes #9453)
Files:      src/testdir/test_filter_map.vim, src/testdir/test_highlight.vim,
            src/testdir/test_regexp_latin.vim, src/testdir/test_search.vim,
            src/testdir/test_vim9_builtin.vim


*** ../vim-8.2.3981/src/testdir/test_filter_map.vim     2021-12-26 
21:54:38.128433097 +0000
--- src/testdir/test_filter_map.vim     2022-01-02 16:15:11.659510421 +0000
***************
*** 151,157 ****
    let lines =<< trim END
      VAR s = "abc"
      call filter(s, '"b" != v:val')
!     call assert_equal(s, s)
      call assert_equal('ac', filter('abc', '"b" != v:val'))
      call assert_equal('㠂㠄㠆㠈㠊', filter('㠂x㠄x㠆x㠈x㠊', '"x" 
!= v:val'))
      call assert_equal('ã ‚a😊💕💕b💕', filter('ã 
‚xax😊x💕💕b💕x', '"x" != v:val'))
--- 151,157 ----
    let lines =<< trim END
      VAR s = "abc"
      call filter(s, '"b" != v:val')
!     call assert_equal('abc', s)
      call assert_equal('ac', filter('abc', '"b" != v:val'))
      call assert_equal('㠂㠄㠆㠈㠊', filter('㠂x㠄x㠆x㠈x㠊', '"x" 
!= v:val'))
      call assert_equal('ã ‚a😊💕💕b💕', filter('ã 
‚xax😊x💕💕b💕x', '"x" != v:val'))
***************
*** 172,178 ****
    let lines =<< trim END
      VAR s = "abc"
      call map(s, 'nr2char(char2nr(v:val) + 2)')
!     call assert_equal(s, s)
      call assert_equal('cde', map('abc', 'nr2char(char2nr(v:val) + 2)'))
      call assert_equal('[㠂][i][㠆][㠈][㠊]', map('㠂i㠆㠈㠊', '"[" .. 
v:val .. "]"'))
      call assert_equal('[ã ‚][a][😊][,][‱][‼][â ‡][â ˆ][â 
‰][💕][b][💕][c][💕]', map('ã ‚a😊,‱‼⠇⠈⠉💕b💕c💕', '"[" 
.. v:val .. "]"'))
--- 172,178 ----
    let lines =<< trim END
      VAR s = "abc"
      call map(s, 'nr2char(char2nr(v:val) + 2)')
!     call assert_equal('abc', s)
      call assert_equal('cde', map('abc', 'nr2char(char2nr(v:val) + 2)'))
      call assert_equal('[㠂][i][㠆][㠈][㠊]', map('㠂i㠆㠈㠊', '"[" .. 
v:val .. "]"'))
      call assert_equal('[ã ‚][a][😊][,][‱][‼][â ‡][â ˆ][â 
‰][💕][b][💕][c][💕]', map('ã ‚a😊,‱‼⠇⠈⠉💕b💕c💕', '"[" 
.. v:val .. "]"'))
***************
*** 191,197 ****
    let lines =<< trim END
      VAR s = "abc"
      call mapnew(s, 'nr2char(char2nr(v:val) + 2)')
!     call assert_equal(s, s)
      call assert_equal('cde', mapnew('abc', 'nr2char(char2nr(v:val) + 2)'))
      call assert_equal('[㠂][i][㠆][㠈][㠊]', mapnew('㠂i㠆㠈㠊', '"[" 
.. v:val .. "]"'))
      call assert_equal('[ã ‚][a][😊][,][‱][‼][â ‡][â ˆ][â 
‰][💕][b][💕][c][💕]', mapnew('ã ‚a😊,‱‼⠇⠈⠉💕b💕c💕', 
'"[" .. v:val .. "]"'))
--- 191,197 ----
    let lines =<< trim END
      VAR s = "abc"
      call mapnew(s, 'nr2char(char2nr(v:val) + 2)')
!     call assert_equal('abc', s)
      call assert_equal('cde', mapnew('abc', 'nr2char(char2nr(v:val) + 2)'))
      call assert_equal('[㠂][i][㠆][㠈][㠊]', mapnew('㠂i㠆㠈㠊', '"[" 
.. v:val .. "]"'))
      call assert_equal('[ã ‚][a][😊][,][‱][‼][â ‡][â ˆ][â 
‰][💕][b][💕][c][💕]', mapnew('ã ‚a😊,‱‼⠇⠈⠉💕b💕c💕', 
'"[" .. v:val .. "]"'))
*** ../vim-8.2.3981/src/testdir/test_highlight.vim      2021-12-07 
21:29:13.934441498 +0000
--- src/testdir/test_highlight.vim      2022-01-02 16:15:11.659510421 +0000
***************
*** 922,938 ****
--- 922,941 ----
    let hlTestHiPre = HighlightArgs('TestHi')
  
    " Test colorscheme
+   call assert_equal("\ndefault", execute('colorscheme'))
    hi clear
    if exists('syntax_on')
      syntax reset
    endif
    let g:colors_name = 'test'
+   call assert_equal("\ntest", execute('colorscheme'))
    hi link TestLink ErrorMsg
    hi TestHi ctermbg=green
  
    " Restore default highlighting
    colorscheme default
    " 'default' should work no matter if highlight group was cleared
+   call assert_equal("\ndefault", execute('colorscheme'))
    hi def link TestLink Identifier
    hi def TestHi ctermbg=red
    let hlTestLinkPost = HighlightArgs('TestLink')
*** ../vim-8.2.3981/src/testdir/test_regexp_latin.vim   2021-12-30 
15:29:14.284333311 +0000
--- src/testdir/test_regexp_latin.vim   2022-01-02 16:15:11.659510421 +0000
***************
*** 6,12 ****
  source check.vim
  
  func s:equivalence_test()
!   let str = "AÀÁÂÃÄÅ B C D EÈÉÊË F G H IÌÍÎÏ J K L M NÑ OÒÓÔÕÖØ P Q R S T 
UÙÚÛÜ V W X YÝ Z aàáâãäå b c d eèéêë f g h iìíîï j k l m nñ oòóôõöø p q r s t 
uùúûü v w x yýÿ z"
    let groups = split(str)
    for group1 in groups
        for c in split(group1, '\zs')
--- 6,15 ----
  source check.vim
  
  func s:equivalence_test()
!   let str = 'AÀÁÂÃÄÅ B C D EÈÉÊË F G H IÌÍÎÏ J K L M NÑ OÒÓÔÕÖØ P Q R S T 
UÙÚÛÜ V W X YÝ Z '
!   \      .. 'aàáâãäå b c d eèéêë f g h iìíîï j k l m nñ oòóôõöø p q r s t 
uùúûü v w x yýÿ z '
!   \      .. "0 1 2 3 4 5 6 7 8 9 "
!   \      .. "` ~ ! ? ; : . , / \\ ' \" | < > [ ] { } ( ) @ # $ % ^ & * _ - + 
\b \e \f \n \r \t"
    let groups = split(str)
    for group1 in groups
        for c in split(group1, '\zs')
*** ../vim-8.2.3981/src/testdir/test_search.vim 2021-10-09 13:58:49.005990220 
+0100
--- src/testdir/test_search.vim 2022-01-02 16:15:11.659510421 +0000
***************
*** 1682,1687 ****
--- 1682,1689 ----
    call assert_fails("call search('\\(')", 'E54:')
    call assert_fails("call search('\\)')", 'E55:')
    call assert_fails("call search('\\z\\(\\)')", 'E66:')
+   call assert_fails("call search('\\z2')", 'E67:')
+   call assert_fails("call search('\\zx')", 'E867:')
    call assert_fails("call search('\\%[ab')", 'E69:')
    call assert_fails("call search('\\%[]')", 'E70:')
    call assert_fails("call search('\\%9999999999999999999999999999v')", 
'E951:')
*** ../vim-8.2.3981/src/testdir/test_vim9_builtin.vim   2022-01-01 
18:29:17.265807214 +0000
--- src/testdir/test_vim9_builtin.vim   2022-01-02 16:15:11.659510421 +0000
***************
*** 956,961 ****
--- 956,963 ----
  
    assert_equal("yes", expandcmd("`={a: 'yes'}['a']`"))
    expandcmd('')->assert_equal('')
+ 
+   CheckDefAndScriptFailure(['expandcmd([1])'], ['E1013: Argument 1: type 
mismatch, expected string but got list<number>', 'E1174: String required for 
argument 1'])
  enddef
  
  def Test_extend_arg_types()
*** ../vim-8.2.3981/src/version.c       2022-01-02 14:08:15.154169689 +0000
--- src/version.c       2022-01-02 16:14:35.959577051 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     3982,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
193. You ask your girlfriend to drive home so you can sit back with
     your PDA and download the information to your laptop

 /// 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/20220102161705.45E101C110C%40moolenaar.net.

Raspunde prin e-mail lui