Skip to content

Commit

Permalink
[add] test
Browse files Browse the repository at this point in the history
  • Loading branch information
get-me-power committed Jun 28, 2022
1 parent c528f79 commit 79a3bee
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
doc/tags
test/.deps
35 changes: 35 additions & 0 deletions test/airline-themes.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
scriptencoding utf-8

let s:themes_dir = expand('<sfile>:h:h') . '/autoload/airline/themes'
let s:themes = map(glob(s:themes_dir . '/*.vim', 1, 1), 'fnamemodify(v:val, ":t:r")')
let s:suite = themis#suite('vim-airline-themes')

function! s:Test_AirlineTheme(theme)
Throws execute('AirlineTheme ' . a:theme)
endfunction

function! s:command_insert(theme)
execute('AirlineTheme ' . a:theme)
execute('source ' . expand('<sfile>:h:h') . '/autoload/airline/themes/' . a:theme . '.vim')
Throws normal! i
endfunction

function! s:command_command(theme)
execute('AirlineTheme ' . a:theme)
execute('source ' . expand('<sfile>:h:h') . '/autoload/airline/themes/' . a:theme . '.vim')
Throws normal! :
endfunction

function! s:suite.__insert__()
let child = themis#suite('INSERT')
for theme in s:themes
let child[theme] = funcref('s:command_insert', [theme])
endfor
endfunction

function! s:suite.__command__()
let child = themis#suite('COMMAND')
for theme in s:themes
let child[theme] = funcref('s:command_command', [theme])
endfor
endfunction
16 changes: 0 additions & 16 deletions test/test.vim

This file was deleted.

0 comments on commit 79a3bee

Please sign in to comment.