mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-27 07:54:44 +02:00
Merge pull request #2372 from vim-airline/add_parts_test
[add] parts's test
This commit is contained in:
commit
06134df810
20
t/parts.vim
20
t/parts.vim
@ -35,4 +35,24 @@ describe 'parts'
|
|||||||
call airline#parts#define_accent('part', 'red')
|
call airline#parts#define_accent('part', 'red')
|
||||||
Expect airline#parts#get('part').accent == 'red'
|
Expect airline#parts#get('part').accent == 'red'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'value should be blank'
|
||||||
|
Expect airline#parts#filetype() == ''
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'can overwrite a filetype'
|
||||||
|
set ft=aaa
|
||||||
|
Expect airline#parts#filetype() == 'aaa'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'can overwrite a filetype'
|
||||||
|
"GitHub actions's vim's column is smaller than 90
|
||||||
|
set ft=aaaa
|
||||||
|
if &columns >= 90
|
||||||
|
Expect airline#parts#filetype() == 'aaaa'
|
||||||
|
else
|
||||||
|
Expect airline#parts#filetype() == 'aaa…'
|
||||||
|
endif
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user