move highlighter code to correct place and test.

This commit is contained in:
Bailey Ling
2013-09-02 02:57:32 +00:00
parent 4b33adee42
commit f6900aeb0a
4 changed files with 59 additions and 32 deletions

10
t/highligher.vim Normal file
View File

@@ -0,0 +1,10 @@
describe 'highlighter'
it 'should create separator highlight groups'
hi Foo1 ctermfg=1 ctermbg=2
hi Foo2 ctermfg=3 ctermbg=4
call airline#highlighter#add_separator('Foo1', 'Foo2', 0)
let hl = airline#highlighter#get_highlight('Foo1_to_Foo2')
Expect hl == [ '', '', '4', '2', '' ]
end
end

View File

@@ -25,5 +25,13 @@ describe 'themes'
Expect colors[2] == '222'
Expect colors[3] == '103'
end
it 'should pass args through correctly'
let hl = airline#themes#get_highlight('Foo', 'bold', 'italic')
Expect hl == ['', '', 0, 1, 'bold,italic']
let hl = airline#themes#get_highlight2(['Foo','bg'], ['Foo','fg'], 'italic', 'bold')
Expect hl == ['', '', 1, 0, 'italic,bold']
end
end