diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea54c54f..916f3a9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,25 +20,16 @@ jobs: steps: - name: Checkout code uses: actions/checkout@main + with: + repository: thinca/vim-themis + path: vim-themis - name: Setup Vim uses: rhysd/action-setup-vim@v1 with: version: ${{ matrix.vim }} - - name: Install Dependencies - run: | - git clone https://github.com/junegunn/vader.vim.git - git clone https://github.com/vim-airline/vim-airline - find $PWD/autoload/airline/themes -name "*.vim" > themes.txt - name: Run Test - run: | - vim --not-a-term -Nu <(cat << VIMRC - filetype off - set rtp+=vader.vim - set rtp+=vim-airline - set rtp+=. - set rtp+=after - filetype plugin indent on - syntax enable - VIMRC) -c 'Vader! test/*' > /dev/null + env: + THEMIS_VIM: ${{ steps.vim.outputs.executable }} + run: ./vim-themis/bin/themis test --reporter spec diff --git a/test/.themisrc b/test/.themisrc new file mode 100644 index 00000000..468596f4 --- /dev/null +++ b/test/.themisrc @@ -0,0 +1,2 @@ +let s:deps = themis#helper('deps') +call s:deps.git('vim-airline/vim-airline') diff --git a/test/airline-themes.vim b/test/airline-themes.vim new file mode 100644 index 00000000..7890fcfe --- /dev/null +++ b/test/airline-themes.vim @@ -0,0 +1,18 @@ +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') + +call themis#helper('command') + +function! s:Test(theme) + Throws execute('AirlineTheme ' . a:theme) +endfunction + +function! s:suite.__themes__() + let child = themis#suite('ExistThemes') + for theme in s:themes + let child[theme] = funcref('s:Test', [theme]) + endfor +endfunction