From 38a90d8801b455a5452fb8c21ab88c37c217ec8c Mon Sep 17 00:00:00 2001 From: kazukazuinaina Date: Wed, 28 Apr 2021 01:49:23 +0900 Subject: [PATCH] [add] parts's test --- t/parts.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/t/parts.vim b/t/parts.vim index 5e30ca49..32dd94af 100644 --- a/t/parts.vim +++ b/t/parts.vim @@ -35,4 +35,24 @@ describe 'parts' call airline#parts#define_accent('part', 'red') Expect airline#parts#get('part').accent == 'red' 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