Skip to content

Commit

Permalink
Merge pull request #435 from ryanoasis/add-filetypesymbol-test
Browse files Browse the repository at this point in the history
[add] some test in filetype
  • Loading branch information
get-me-power authored Oct 1, 2022
2 parents 6fbb763 + 37bf8e1 commit e4784bd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ function! s:Assert(filename, icon)
call s:assert.equals(WebDevIconsGetFileTypeSymbol(a:filename), a:icon)
endfunction

function! s:suite.NoArgument_GetDefaultIcon()
call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '')
endfunction

function! s:suite.__OneArgument_VimIcon__()
let targetfilenames = ['.vimrc', 'vimrc', '.gvimrc', '_gvimrc', 'test.vim']
let expecticon = ''
Expand Down Expand Up @@ -283,6 +287,22 @@ function! s:suite.OneArgument_PemIcon()
call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.pem'), '')
endfunction

function! s:suite.TwoArgument_zero_GetFileIcon()
call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 0), '')
endfunction

function! s:suite.TwoArgument_one_GetFolderIcon()
call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 1), '')
endfunction

function! s:suite.TwoArgument_two_GetDefaultIcon()
call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.vim', 2), '')
endfunction

function! s:suite.TwoArgument_string_GetFileTypeIcon()
call s:assert.equals( WebDevIconsGetFileTypeSymbol('test.php', 'test.vim'), '')
endfunction

function! s:suite.NoArgument_OverWriteFileType_GetVimIcon()
set ft=vim
call s:assert.equals(WebDevIconsGetFileTypeSymbol(), '')
Expand Down

0 comments on commit e4784bd

Please sign in to comment.