forked from ryanoasis/vim-devicons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfileformat.vim
29 lines (24 loc) · 841 Bytes
/
fileformat.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
scriptencoding utf-8
" Please use nerd-font if you watch icon-font
let s:suite = themis#suite('WebDevIconsGetFileFormatSymbol')
let s:assert = themis#helper('assert')
function! s:suite.UnixIcon()
set fileformat=unix
let os = system('uname -a')
if os =~# 'Darwin'
call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '')
" It may return Ubuntu because github-actions's OS is Ubuntu
elseif os =~# 'Ubuntu'
call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '')
else
call s:assert.skip('Skip testing except for Ubuntu and Mac.')
endif
endfunction
function! s:suite.WindowsIcon()
set fileformat=dos
call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '')
endfunction
function! s:suite.MacIcon()
set fileformat=mac
call s:assert.equals(WebDevIconsGetFileFormatSymbol(), '')
endfunction