comparison src/testdir/test_highlight.vim @ 19932:2c4d9ca33769 v8.2.0522

patch 8.2.0522: several errors are not tested for Commit: https://github.com/vim/vim/commit/ee4e0c1e9a81cb5d96e0060203a9033c2f28588e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 6 21:35:05 2020 +0200 patch 8.2.0522: several errors are not tested for Problem: Several errors are not tested for. Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5892)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Apr 2020 21:45:31 +0200
parents a4b65930a0dc
children c087099e9163
comparison
equal deleted inserted replaced
19931:db6b095f4073 19932:2c4d9ca33769
687 call assert_match('hi Normal\s*font=.*', hlNormal) 687 call assert_match('hi Normal\s*font=.*', hlNormal)
688 endif 688 endif
689 endfunc 689 endfunc
690 690
691 " Do this test last, sometimes restoring the columns doesn't work 691 " Do this test last, sometimes restoring the columns doesn't work
692 function Test_z_no_space_before_xxx() 692 func Test_z_no_space_before_xxx()
693 let l:org_columns = &columns 693 let l:org_columns = &columns
694 set columns=17 694 set columns=17
695 let l:hi_StatusLineTermNC = join(split(execute('hi StatusLineTermNC'))) 695 let l:hi_StatusLineTermNC = join(split(execute('hi StatusLineTermNC')))
696 call assert_match('StatusLineTermNC xxx', l:hi_StatusLineTermNC) 696 call assert_match('StatusLineTermNC xxx', l:hi_StatusLineTermNC)
697 let &columns = l:org_columns 697 let &columns = l:org_columns
698 endfunction 698 endfunc
699
700 " Test for :highlight command errors
701 func Test_highlight_cmd_errors()
702 if has('gui_running')
703 " This test doesn't fail in the MS-Windows console version.
704 call assert_fails('hi Xcomment ctermfg=fg', 'E419:')
705 call assert_fails('hi Xcomment ctermfg=bg', 'E420:')
706 endif
707
708 " Try using a very long terminal code. Define a dummy terminal code for this
709 " test.
710 let &t_fo = "\<Esc>1;"
711 let c = repeat("t_fo,", 100) . "t_fo"
712 call assert_fails('exe "hi Xgroup1 start=" . c', 'E422:')
713 let &t_fo = ""
714 endfunc
715
716 " vim: shiftwidth=2 sts=2 expandtab