From 7d702a6bf2d5538b5a0380b6a878c9fe108b20a3 Mon Sep 17 00:00:00 2001 From: kazukazuinaina Date: Wed, 29 Jun 2022 01:21:54 +0900 Subject: [PATCH] [add] test --- test/airline-themes.vim | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/airline-themes.vim diff --git a/test/airline-themes.vim b/test/airline-themes.vim new file mode 100644 index 00000000..f7856c60 --- /dev/null +++ b/test/airline-themes.vim @@ -0,0 +1,35 @@ +scriptencoding utf-8 + +let s:themes_dir = expand(':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(':h:h') . '/autoload/airline/themes/' . a:theme . '.vim') + Throws normal! i +endfunction + +function! s:command_command(theme) + execute('AirlineTheme ' . a:theme) + execute('source ' . expand(':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