mirror of
https://github.com/powerline/powerline.git
synced 2025-07-31 01:35:40 +02:00
Test tabline in test_tabline.vim file
This commit is contained in:
parent
ff91ff7f92
commit
07c533d1b2
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/vim -S
|
#!/usr/bin/vim -S
|
||||||
set nocompatible
|
set nocompatible
|
||||||
|
tabedit abc
|
||||||
|
tabedit def
|
||||||
try
|
try
|
||||||
source powerline/bindings/vim/plugin/powerline.vim
|
source powerline/bindings/vim/plugin/powerline.vim
|
||||||
catch
|
catch
|
||||||
@ -16,4 +18,4 @@ if len(mess)>1
|
|||||||
call writefile(mess, 'message.fail')
|
call writefile(mess, 'message.fail')
|
||||||
cquit
|
cquit
|
||||||
endif
|
endif
|
||||||
quit!
|
qall!
|
||||||
|
18
tests/test_tabline.vim
Executable file
18
tests/test_tabline.vim
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/vim -S
|
||||||
|
source powerline/bindings/vim/plugin/powerline.vim
|
||||||
|
edit abc
|
||||||
|
tabedit def
|
||||||
|
tabedit ghi
|
||||||
|
try
|
||||||
|
let &columns = 80
|
||||||
|
let result = eval(&tabline[2:])
|
||||||
|
catch
|
||||||
|
call writefile(['Exception while evaluating &tabline', v:exception], 'message.fail')
|
||||||
|
cquit
|
||||||
|
endtry
|
||||||
|
|
||||||
|
if result isnot# '%#Pl_240_5789784_235_2500134_NONE# ./%#Pl_244_8421504_235_2500134_bold#abc %#Pl_244_8421504_235_2500134_NONE# %#Pl_240_5789784_235_2500134_NONE#./%#Pl_244_8421504_235_2500134_bold#def %#Pl_235_2500134_240_5789784_NONE# %#Pl_250_12369084_240_5789784_NONE#./%#Pl_231_16777215_240_5789784_bold#ghi %#Pl_240_5789784_236_3158064_NONE# %#Pl_231_16777215_236_3158064_NONE# '
|
||||||
|
call writefile(['Unexpected result', result], 'message.fail')
|
||||||
|
cquit
|
||||||
|
endif
|
||||||
|
qall!
|
Loading…
x
Reference in New Issue
Block a user