mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2025-12-06 09:14:24 +08:00
Compare commits
7 Commits
04654fbfd3
...
605ca4a1f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
605ca4a1f3 | ||
|
|
cda3b5ea08 | ||
|
|
79a3beecfe | ||
|
|
c528f796a8 | ||
|
|
1c6ad8bf8f | ||
|
|
8ff94b2138 | ||
|
|
09d9ef6bf7 |
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -1,8 +1,12 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -11,34 +15,29 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
vim:
|
vim:
|
||||||
- v8.2.2000
|
|
||||||
- v8.2.1000
|
- v8.2.1000
|
||||||
- v8.2.0000
|
- v8.2.0000
|
||||||
- v8.1.0000
|
- v8.1.0000
|
||||||
- v8.0.0000
|
- v8.0.0000
|
||||||
|
- v7.4
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Checkout vim-themis
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: thinca/vim-themis
|
||||||
|
path: vim-themis
|
||||||
|
|
||||||
- name: Setup Vim
|
- name: Setup Vim
|
||||||
uses: rhysd/action-setup-vim@v1
|
uses: rhysd/action-setup-vim@v1
|
||||||
|
id: vim
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.vim }}
|
version: ${{ matrix.vim }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Test
|
||||||
run: |
|
env:
|
||||||
git clone https://github.com/junegunn/vader.vim.git
|
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
|
||||||
git clone https://github.com/vim-airline/vim-airline
|
run: ./vim-themis/bin/themis --reporter spec
|
||||||
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
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
doc/tags
|
doc/tags
|
||||||
|
test/.deps
|
||||||
|
|||||||
0
autoload/airline/themes/ouo.vim
Executable file → Normal file
0
autoload/airline/themes/ouo.vim
Executable file → Normal file
4
test/.themisrc
Normal file
4
test/.themisrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
let s:deps = themis#helper('deps')
|
||||||
|
call s:deps.git('vim-airline/vim-airline')
|
||||||
|
|
||||||
|
call themis#helper('command')
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# Make sure that theme and 5 basic modes don't throw an error
|
|
||||||
# Get list of all included themes
|
|
||||||
Execute (validate themes):
|
|
||||||
let themes = readfile('themes.txt')
|
|
||||||
call sort(themes)
|
|
||||||
|
|
||||||
let err_proc = v:false
|
|
||||||
try
|
|
||||||
|
|
||||||
for themePath in themes
|
|
||||||
|
|
||||||
" Check all the basic modes and their modified counterparts
|
|
||||||
" This test only fails on exceptional cases
|
|
||||||
let theme = fnamemodify(themePath, ':t:r')
|
|
||||||
Log theme
|
|
||||||
execute('AirlineTheme ' . theme)
|
|
||||||
execute('source ' . themePath)
|
|
||||||
normal! i
|
|
||||||
normal! :
|
|
||||||
normal! R
|
|
||||||
normal! v
|
|
||||||
setlocal mod
|
|
||||||
normal! i
|
|
||||||
normal! :
|
|
||||||
normal! R
|
|
||||||
normal! v
|
|
||||||
setlocal nomod
|
|
||||||
|
|
||||||
endfor
|
|
||||||
|
|
||||||
catch
|
|
||||||
let err_proc = v:true
|
|
||||||
Log "Failed validation testing with exception:"
|
|
||||||
Log string(v:exception)
|
|
||||||
endtry
|
|
||||||
AirlineRefresh
|
|
||||||
|
|
||||||
Assert !err_proc
|
|
||||||
35
test/airline-themes.vim
Normal file
35
test/airline-themes.vim
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user