Skip to content

Commit 09d9ef6

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

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
strategy:
1212
matrix:
1313
vim:
14-
- v8.2.2000
1514
- v8.2.1000
1615
- v8.2.0000
1716
- v8.1.0000
@@ -20,25 +19,16 @@ jobs:
2019
steps:
2120
- name: Checkout code
2221
uses: actions/checkout@main
22+
with:
23+
repository: thinca/vim-themis
24+
path: vim-themis
2325

2426
- name: Setup Vim
2527
uses: rhysd/action-setup-vim@v1
2628
with:
2729
version: ${{ matrix.vim }}
2830

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
3431
- 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
32+
env:
33+
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
34+
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)