Mercurial > vim
view src/testdir/test_syn_attr.vim @ 9452:6d5c24b8dc0e v7.4.2007
commit https://github.com/vim/vim/commit/fc4ad616073a169badfb2b9906fee2844f76f730
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 15:38:32 2016 +0200
patch 7.4.2007
Problem: Running the tests leaves a viminfo file behind.
Solution: Make the viminfo option empty.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Jul 2016 15:45:07 +0200 |
parents | 35422e34815f |
children | 201773c00b96 |
line wrap: on
line source
" Test syntax highlighting functions. func Test_missing_attr() hi Mine term=bold cterm=italic call assert_equal('Mine', synIDattr(hlID("Mine"), "name")) call assert_equal('', synIDattr(hlID("Mine"), "bg", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "bold", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "italic", 'cterm')) hi Mine term=reverse cterm=inverse call assert_equal('1', synIDattr(hlID("Mine"), "reverse", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "inverse", 'cterm')) hi Mine term=underline cterm=standout gui=undercurl call assert_equal('1', synIDattr(hlID("Mine"), "underline", 'term')) call assert_equal('1', synIDattr(hlID("Mine"), "standout", 'cterm')) call assert_equal('1', synIDattr(hlID("Mine"), "undercurl", 'gui')) hi Mine term=NONE cterm=NONE gui=NONE call assert_equal('', synIDattr(hlID("Mine"), "bold", 'term')) call assert_equal('', synIDattr(hlID("Mine"), "italic", 'cterm')) call assert_equal('', synIDattr(hlID("Mine"), "reverse", 'term')) call assert_equal('', synIDattr(hlID("Mine"), "inverse", 'cterm')) call assert_equal('', synIDattr(hlID("Mine"), "underline", 'term')) call assert_equal('', synIDattr(hlID("Mine"), "standout", 'cterm')) call assert_equal('', synIDattr(hlID("Mine"), "undercurl", 'gui')) if has('gui') let fontname = getfontname() if fontname == '' let fontname = 'something' endif exe "hi Mine guifg=blue guibg=red font='" . fontname . "'" call assert_equal('blue', synIDattr(hlID("Mine"), "fg", 'gui')) call assert_equal('red', synIDattr(hlID("Mine"), "bg", 'gui')) call assert_equal(fontname, synIDattr(hlID("Mine"), "font", 'gui')) endif endfunc