comparison src/testdir/test_syn_attr.vim @ 8518:24ac80377d86 v7.4.1549

commit https://github.com/vim/vim/commit/c835293d54c223627c7d4516ee273c21a3506fa1 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 20:15:21 2016 +0100 patch 7.4.1549 Problem: Test for syntax attributes fails in Win32 GUI. Solution: Use an existing font name.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 20:30:04 +0100
parents 260d01c1cd17
children 35422e34815f
comparison
equal deleted inserted replaced
8517:6dfd76e21fba 8518:24ac80377d86
21 call assert_equal('', synIDattr(hlID("Mine"), "underline", 'term')) 21 call assert_equal('', synIDattr(hlID("Mine"), "underline", 'term'))
22 call assert_equal('', synIDattr(hlID("Mine"), "standout", 'cterm')) 22 call assert_equal('', synIDattr(hlID("Mine"), "standout", 'cterm'))
23 call assert_equal('', synIDattr(hlID("Mine"), "undercurl", 'gui')) 23 call assert_equal('', synIDattr(hlID("Mine"), "undercurl", 'gui'))
24 24
25 if has('gui') 25 if has('gui')
26 hi Mine guifg=blue guibg=red font=something 26 let fontname = getfontname()
27 if fontname == ''
28 let fontname = 'something'
29 endif
30 exe 'hi Mine guifg=blue guibg=red font=' . escape(fontname, ' \')
27 call assert_equal('blue', synIDattr(hlID("Mine"), "fg", 'gui')) 31 call assert_equal('blue', synIDattr(hlID("Mine"), "fg", 'gui'))
28 call assert_equal('red', synIDattr(hlID("Mine"), "bg", 'gui')) 32 call assert_equal('red', synIDattr(hlID("Mine"), "bg", 'gui'))
29 call assert_equal('something', synIDattr(hlID("Mine"), "font", 'gui')) 33 call assert_equal(fontname, synIDattr(hlID("Mine"), "font", 'gui'))
30 endif 34 endif
31 endfunc 35 endfunc