Skip to content

Commit b5d9325

Browse files
committed
[add] vim-themis's test
1 parent 97cf3e6 commit b5d9325

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,16 @@ jobs:
2020
steps:
2121
- name: Checkout code
2222
uses: actions/checkout@main
23+
with:
24+
repository: thinca/vim-themis
25+
path: vim-themis
2326

2427
- name: Setup Vim
2528
uses: rhysd/action-setup-vim@v1
2629
with:
2730
version: ${{ matrix.vim }}
2831

29-
- name: Install Dependencies
30-
run: |
31-
git clone https://github.com/junegunn/vader.vim.git
32-
git clone https://github.com/vim-airline/vim-airline
33-
find $PWD/autoload/airline/themes -name "*.vim" > themes.txt
3432
- name: Run Test
35-
run: |
36-
vim --not-a-term -Nu <(cat << VIMRC
37-
filetype off
38-
set rtp+=vader.vim
39-
set rtp+=vim-airline
40-
set rtp+=.
41-
set rtp+=after
42-
filetype plugin indent on
43-
syntax enable
44-
VIMRC) -c 'Vader! test/*' > /dev/null
33+
env:
34+
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
35+
run: ./vim-themis/bin/themis --reporter spec

test/.themisrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let s:deps = themis#helper('deps')
2+
call s:deps.git('vim-airline/vim-airline')

test/airline-themes.vim

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
scriptencoding utf-8
2+
3+
let s:themes_dir = expand('<sfile>:h:h') . '/autoload/airline/themes'
4+
let s:themes = map(glob(s:themes_dir . '/*.vim', 1, 1), 'fnamemodify(v:val, ":t:r")')
5+
let s:suite = themis#suite('vim-airline-themes')
6+
7+
call themis#helper('command')
8+
9+
function! s:Test(theme)
10+
Throws execute('AirlineTheme ' . a:theme)
11+
endfunction
12+
13+
function! s:suite.__themes__()
14+
let child = themis#suite('ExistThemes')
15+
for theme in s:themes
16+
let child[theme] = funcref('s:Test', [theme])
17+
endfor
18+
endfunction

0 commit comments

Comments
 (0)