Fix tests for the changed default separators
This commit is contained in:
parent
078537f1e2
commit
d624a44500
@ -15,7 +15,7 @@ describe 'active builder'
|
|||||||
call s:builder.add_section('Normal', 'hello')
|
call s:builder.add_section('Normal', 'hello')
|
||||||
call s:builder.add_section('Search', 'world')
|
call s:builder.add_section('Search', 'world')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl =~ '%#Normal#hello%#Normal_to_Search#>%#Search#world'
|
Expect stl =~ '%#Normal#hello%#Normal_to_Search#%#Search#world'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should reuse highlight group if background colors match'
|
it 'should reuse highlight group if background colors match'
|
||||||
@ -24,7 +24,7 @@ describe 'active builder'
|
|||||||
call s:builder.add_section('Foo1', 'hello')
|
call s:builder.add_section('Foo1', 'hello')
|
||||||
call s:builder.add_section('Foo2', 'world')
|
call s:builder.add_section('Foo2', 'world')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl =~ '%#Foo1#hello>world'
|
Expect stl =~ '%#Foo1#helloworld'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should switch highlight groups if foreground colors differ'
|
it 'should switch highlight groups if foreground colors differ'
|
||||||
@ -33,7 +33,7 @@ describe 'active builder'
|
|||||||
call s:builder.add_section('Foo1', 'hello')
|
call s:builder.add_section('Foo1', 'hello')
|
||||||
call s:builder.add_section('Foo2', 'world')
|
call s:builder.add_section('Foo2', 'world')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl =~ '%#Foo1#hello%#Foo1_to_Foo2#>%#Foo2#world'
|
Expect stl =~ '%#Foo1#hello%#Foo1_to_Foo2#%#Foo2#world'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should split left/right sections'
|
it 'should split left/right sections'
|
||||||
@ -47,14 +47,14 @@ describe 'active builder'
|
|||||||
call s:builder.add_section('Normal', 'hello')
|
call s:builder.add_section('Normal', 'hello')
|
||||||
call s:builder.add_section('Search', 'world')
|
call s:builder.add_section('Search', 'world')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl =~ 'hello%#Normal_to_Search#<%#Search#world'
|
Expect stl =~ 'hello%#Normal_to_Search#%#Search#world'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not repeat the same highlight group'
|
it 'should not repeat the same highlight group'
|
||||||
call s:builder.add_section('Normal', 'hello')
|
call s:builder.add_section('Normal', 'hello')
|
||||||
call s:builder.add_section('Normal', 'hello')
|
call s:builder.add_section('Normal', 'hello')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl == '%#Normal#hello>hello'
|
Expect stl == '%#Normal#hellohello'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should replace accent groups with the specified group'
|
it 'should replace accent groups with the specified group'
|
||||||
@ -94,7 +94,7 @@ describe 'inactive builder'
|
|||||||
call s:builder.add_section('Normal', 'hello')
|
call s:builder.add_section('Normal', 'hello')
|
||||||
call s:builder.add_section('Search', 'world')
|
call s:builder.add_section('Search', 'world')
|
||||||
let stl = s:builder.build()
|
let stl = s:builder.build()
|
||||||
Expect stl =~ '%#Normal_inactive#hello%#Normal_to_Search_inactive#>%#Search_inactive#world'
|
Expect stl =~ '%#Normal_inactive#hello%#Normal_to_Search_inactive#%#Search_inactive#world'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not render accents'
|
it 'should not render accents'
|
||||||
|
@ -57,13 +57,13 @@ describe 'section'
|
|||||||
|
|
||||||
it 'should force add separators for raw and missing keys'
|
it 'should force add separators for raw and missing keys'
|
||||||
let s = airline#section#create_left(['asdf', 'raw'])
|
let s = airline#section#create_left(['asdf', 'raw'])
|
||||||
Expect s == 'asdf > raw'
|
Expect s == 'asdf raw'
|
||||||
let s = airline#section#create_left(['asdf', 'aaaa', 'raw'])
|
let s = airline#section#create_left(['asdf', 'aaaa', 'raw'])
|
||||||
Expect s == 'asdf > aaaa > raw'
|
Expect s == 'asdf aaaa raw'
|
||||||
let s = airline#section#create_right(['raw', '%f'])
|
let s = airline#section#create_right(['raw', '%f'])
|
||||||
Expect s == 'raw < %f'
|
Expect s == 'raw %f'
|
||||||
let s = airline#section#create_right(['%t', 'asdf', '%{getcwd()}'])
|
let s = airline#section#create_right(['%t', 'asdf', '%{getcwd()}'])
|
||||||
Expect s == '%t < asdf < %{getcwd()}'
|
Expect s == '%t asdf %{getcwd()}'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should empty out parts that do not pass their condition'
|
it 'should empty out parts that do not pass their condition'
|
||||||
|
@ -17,12 +17,12 @@ describe 'util'
|
|||||||
|
|
||||||
it 'has append wrapper function'
|
it 'has append wrapper function'
|
||||||
Expect airline#util#append('', 0) == ''
|
Expect airline#util#append('', 0) == ''
|
||||||
Expect airline#util#append('1', 0) == ' > 1'
|
Expect airline#util#append('1', 0) == ' 1'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has prepend wrapper function'
|
it 'has prepend wrapper function'
|
||||||
Expect airline#util#prepend('', 0) == ''
|
Expect airline#util#prepend('', 0) == ''
|
||||||
Expect airline#util#prepend('1', 0) == '1 < '
|
Expect airline#util#prepend('1', 0) == '1 '
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has getwinvar function'
|
it 'has getwinvar function'
|
||||||
@ -40,8 +40,8 @@ describe 'util'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should ignore minwidth if less than 0'
|
it 'should ignore minwidth if less than 0'
|
||||||
Expect airline#util#append('foo', -1) == ' > foo'
|
Expect airline#util#append('foo', -1) == ' foo'
|
||||||
Expect airline#util#prepend('foo', -1) == 'foo < '
|
Expect airline#util#prepend('foo', -1) == 'foo '
|
||||||
Expect airline#util#wrap('foo', -1) == 'foo'
|
Expect airline#util#wrap('foo', -1) == 'foo'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user