fugitive: remove old fugitive test

As mentioned by @tpope, remove the old test for the autoloaded function
fugitivie#head() and instead use consistently FugitiveHead() everywhere

[delete] %bd command

[add] init.vimspec

[update] init.vimspec

[add] parts.vim

[add] section.vimspec

[add] themes.vimspec

[add] util.vimspec

[delete] vim-vspec
This commit is contained in:
Christian Brabandt
2022-05-21 21:57:01 +02:00
committed by kazukazuinaina
parent 9fad2c3fc4
commit 1a7d546448
19 changed files with 404 additions and 776 deletions

58
test/parts.vimspec Normal file
View File

@@ -0,0 +1,58 @@
Describe parts.vim
It overwrItes existing values
call airline#parts#define('foo', { 'test': '123' })
Assert Equals(airline#parts#get('foo').test, '123')
call airline#parts#define('foo', { 'test': '321' })
Assert Equals(airline#parts#get('foo').test, '321')
End
It can define a function part
call airline#parts#define_function('func', 'bar')
Assert Equals(airline#parts#get('func').function, 'bar')
End
It can define a text part
call airline#parts#define_text('text', 'bar')
Assert Equals(airline#parts#get('text').text, 'bar')
End
It can define a raw part
call airline#parts#define_raw('raw', 'bar')
Assert Equals(airline#parts#get('raw').raw, 'bar')
End
It can define a minwidth
call airline#parts#define_minwidth('mw', 123)
Assert Equals(airline#parts#get('mw').minwidth, 123)
End
It 'can define a condition'
call airline#parts#define_condition('part', '1')
Assert Equals(airline#parts#get('part').condition, '1')
End
It 'can define a accent'
call airline#parts#define_accent('part', 'red')
Assert Equals(airline#parts#get('part').accent, 'red')
End
It 'value should be blank'
Assert Equals(airline#parts#filetype(), '')
End
It 'can overwrIte a filetype'
set ft=aaa
Assert Equals(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
Assert Equals(airline#parts#filetype(), 'aaaa')
else
Assert Equals(airline#parts#filetype(), 'aaa…')
endif
End
End