mirror of
https://github.com/amix/vimrc
synced 2025-07-09 02:25:00 +08:00
Updated plugins
This commit is contained in:
@ -13,9 +13,27 @@ describe 'active builder'
|
||||
|
||||
it 'should transition colors from one to the next'
|
||||
call s:builder.add_section('Normal', 'hello')
|
||||
call s:builder.add_section('NonText', 'world')
|
||||
call s:builder.add_section('Search', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ '%#Normal#hello%#Normal_to_NonText#>%#NonText#world'
|
||||
Expect stl =~ '%#Normal#hello%#Normal_to_Search#>%#Search#world'
|
||||
end
|
||||
|
||||
it 'should reuse highlight group if background colors match'
|
||||
highlight Foo1 ctermfg=1 ctermbg=2
|
||||
highlight Foo2 ctermfg=1 ctermbg=2
|
||||
call s:builder.add_section('Foo1', 'hello')
|
||||
call s:builder.add_section('Foo2', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ '%#Foo1#hello>world'
|
||||
end
|
||||
|
||||
it 'should switch highlight groups if foreground colors differ'
|
||||
highlight Foo1 ctermfg=1 ctermbg=2
|
||||
highlight Foo2 ctermfg=2 ctermbg=2
|
||||
call s:builder.add_section('Foo1', 'hello')
|
||||
call s:builder.add_section('Foo2', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ '%#Foo1#hello%#Foo1_to_Foo2#>%#Foo2#world'
|
||||
end
|
||||
|
||||
it 'should split left/right sections'
|
||||
@ -27,9 +45,9 @@ describe 'active builder'
|
||||
it 'after split, sections use the right separator'
|
||||
call s:builder.split()
|
||||
call s:builder.add_section('Normal', 'hello')
|
||||
call s:builder.add_section('NonText', 'world')
|
||||
call s:builder.add_section('Search', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ '%#Normal#hello%#Normal_to_NonText#<%#NonText#world'
|
||||
Expect stl =~ 'hello%#Normal_to_Search#<%#Search#world'
|
||||
end
|
||||
|
||||
it 'should not repeat the same highlight group'
|
||||
@ -57,6 +75,14 @@ describe 'active builder'
|
||||
Expect stl !~ '%#__restore__#'
|
||||
Expect stl =~ '%#Normal#'
|
||||
end
|
||||
|
||||
it 'should blend colors from the left through the split to the right'
|
||||
call s:builder.add_section('Normal', 'hello')
|
||||
call s:builder.split()
|
||||
call s:builder.add_section('Search', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ 'Normal_to_Search'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'inactive builder'
|
||||
@ -66,9 +92,9 @@ describe 'inactive builder'
|
||||
|
||||
it 'should transition colors from one to the next'
|
||||
call s:builder.add_section('Normal', 'hello')
|
||||
call s:builder.add_section('NonText', 'world')
|
||||
call s:builder.add_section('Search', 'world')
|
||||
let stl = s:builder.build()
|
||||
Expect stl =~ '%#Normal_inactive#hello%#Normal_to_NonText_inactive#>%#NonText_inactive#world'
|
||||
Expect stl =~ '%#Normal_inactive#hello%#Normal_to_Search_inactive#>%#Search_inactive#world'
|
||||
end
|
||||
|
||||
it 'should not render accents'
|
||||
|
Reference in New Issue
Block a user