Patch 8.2.1097
Problem:    Highlight code not sufficiently tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #6359)
Files:      src/testdir/test_filter_cmd.vim, src/testdir/test_highlight.vim


*** ../vim-8.2.1096/src/testdir/test_filter_cmd.vim     2020-02-21 
17:54:41.830235712 +0100
--- src/testdir/test_filter_cmd.vim     2020-06-30 18:43:53.238037681 +0200
***************
*** 146,151 ****
--- 146,156 ----
    let res = split(execute("filter /\.c$/ marks"), "\n")[1:]
    call assert_equal([" A      1    0 file.c"], res)
  
+   " Test filtering :highlight command
+   highlight MyHlGroup ctermfg=10
+   let res = split(execute("filter /MyHlGroup/ highlight"), "\n")
+   call assert_equal(["MyHlGroup      xxx ctermfg=10"], res)
+ 
    call setline(1, ['one', 'two', 'three'])
    1mark a
    2mark b
*** ../vim-8.2.1096/src/testdir/test_highlight.vim      2020-06-28 
13:10:17.546125326 +0200
--- src/testdir/test_highlight.vim      2020-06-30 18:43:53.238037681 +0200
***************
*** 761,764 ****
--- 761,807 ----
    hi clear
  endfunc
  
+ " Test for using default highlighting group
+ func Test_highlight_default()
+   highlight MySearch ctermfg=7
+   highlight default MySearch ctermfg=5
+   let hlSearch = HighlightArgs('MySearch')
+   call assert_match('ctermfg=7', hlSearch)
+ 
+   highlight default QFName ctermfg=3
+   call assert_match('ctermfg=3', HighlightArgs('QFName'))
+   hi clear
+ endfunc
+ 
+ " Test for 'ctermul in a highlight group
+ func Test_highlight_ctermul()
+   CheckNotGui
+   call assert_notmatch('ctermul=', HighlightArgs('Normal'))
+   highlight Normal ctermul=3
+   call assert_match('ctermul=3', HighlightArgs('Normal'))
+   highlight Normal ctermul=NONE
+ endfunc
+ 
+ " Test for specifying 'start' and 'stop' in a highlight group
+ func Test_highlight_start_stop()
+   hi HlGrp1 start=<Esc>[27h;<Esc>[<Space>r;
+   call assert_match("start=^[[27h;^[[ r;", HighlightArgs('HlGrp1'))
+   hi HlGrp1 start=NONE
+   call assert_notmatch("start=", HighlightArgs('HlGrp1'))
+   hi HlGrp2 stop=<Esc>[27h;<Esc>[<Space>r;
+   call assert_match("stop=^[[27h;^[[ r;", HighlightArgs('HlGrp2'))
+   hi HlGrp2 stop=NONE
+   call assert_notmatch("stop=", HighlightArgs('HlGrp2'))
+   hi clear
+ endfunc
+ 
+ " Test for setting various 'term' attributes
+ func Test_highlight_term_attr()
+   hi HlGrp3 
term=bold,underline,undercurl,strikethrough,reverse,italic,standout
+   call assert_equal('hi HlGrp3          
term=bold,standout,underline,undercurl,italic,reverse,strikethrough', 
HighlightArgs('HlGrp3'))
+   hi HlGrp3 term=NONE
+   call assert_equal('hi HlGrp3          cleared', HighlightArgs('HlGrp3'))
+   hi clear
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.1096/src/version.c       2020-06-30 13:37:57.935017105 +0200
--- src/version.c       2020-06-30 18:45:05.221692901 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1097,
  /**/

-- 
Mynd you, m00se bites Kan be pretty nasti ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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/202006301646.05UGkBE0937852%40masaka.moolenaar.net.

Raspunde prin e-mail lui