Make it easier to run tests locally
Certain tests could break if you ran them separately from other tests. They have been patched. `run-tests` now has a `--fast` option which runs tests with only the fastest Vim version ALE tests with, and the custom checks.
This commit is contained in:
parent
5ceda0164c
commit
5c778e1ae7
10 changed files with 41 additions and 0 deletions
|
@ -83,6 +83,13 @@ while [ $# -ne 0 ]; do
|
||||||
run_neovim_03_tests=0
|
run_neovim_03_tests=0
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--fast)
|
||||||
|
run_vim_80_tests=0
|
||||||
|
run_vim_81_tests=0
|
||||||
|
run_neovim_02_tests=0
|
||||||
|
run_neovim_03_tests=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--help)
|
--help)
|
||||||
echo 'Usage: ./run-tests [OPTION]... [FILE]...'
|
echo 'Usage: ./run-tests [OPTION]... [FILE]...'
|
||||||
echo
|
echo
|
||||||
|
@ -99,6 +106,7 @@ while [ $# -ne 0 ]; do
|
||||||
echo ' --vim-80-only Run tests only for Vim 8.0'
|
echo ' --vim-80-only Run tests only for Vim 8.0'
|
||||||
echo ' --vim-81-only Run tests only for Vim 8.1'
|
echo ' --vim-81-only Run tests only for Vim 8.1'
|
||||||
echo ' --linters-only Run only Vint and custom checks'
|
echo ' --linters-only Run only Vint and custom checks'
|
||||||
|
echo ' --fast Run only the fastest Vim and custom checks'
|
||||||
echo ' --help Show this help text'
|
echo ' --help Show this help text'
|
||||||
echo ' -- Stop parsing options after this'
|
echo ' -- Stop parsing options after this'
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -5,12 +5,14 @@ Before:
|
||||||
Save g:ale_fix_on_save
|
Save g:ale_fix_on_save
|
||||||
Save g:ale_lint_on_save
|
Save g:ale_lint_on_save
|
||||||
Save g:ale_echo_cursor
|
Save g:ale_echo_cursor
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
silent! cd /testplugin/test/fix
|
silent! cd /testplugin/test/fix
|
||||||
|
|
||||||
unlet! b:ale_lint_on_save
|
unlet! b:ale_lint_on_save
|
||||||
let g:ale_enabled = 0
|
let g:ale_enabled = 0
|
||||||
let g:ale_echo_cursor = 0
|
let g:ale_echo_cursor = 0
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
let g:ale_run_synchronously = 1
|
let g:ale_run_synchronously = 1
|
||||||
let g:ale_set_lists_synchronously = 1
|
let g:ale_set_lists_synchronously = 1
|
||||||
let g:ale_fix_buffer_data = {}
|
let g:ale_fix_buffer_data = {}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
Before:
|
Before:
|
||||||
call ale#assert#SetUpFixerTest('javascript', 'eslint')
|
call ale#assert#SetUpFixerTest('javascript', 'eslint')
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
runtime autoload/ale/handlers/eslint.vim
|
runtime autoload/ale/handlers/eslint.vim
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
|
|
||||||
After:
|
After:
|
||||||
call ale#assert#TearDownFixerTest()
|
call ale#assert#TearDownFixerTest()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
Before:
|
Before:
|
||||||
call ale#assert#SetUpFixerTest('javascript', 'prettier_eslint')
|
call ale#assert#SetUpFixerTest('javascript', 'prettier_eslint')
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
|
|
||||||
After:
|
After:
|
||||||
call ale#assert#TearDownFixerTest()
|
call ale#assert#TearDownFixerTest()
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
Before:
|
Before:
|
||||||
call ale#assert#SetUpFixerTest('javascript', 'prettier')
|
call ale#assert#SetUpFixerTest('javascript', 'prettier')
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
|
|
||||||
silent cd ..
|
silent cd ..
|
||||||
silent cd command_callback
|
silent cd command_callback
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
Before:
|
||||||
|
runtime ale_linters/glsl/glslang.vim
|
||||||
|
|
||||||
Execute(The glsl glslang handler should parse lines correctly):
|
Execute(The glsl glslang handler should parse lines correctly):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
Before:
|
||||||
|
Save g:ale_javascript_eslint_suppress_eslintignore
|
||||||
|
|
||||||
|
let g:ale_javascript_eslint_suppress_eslintignore = 0
|
||||||
|
|
||||||
|
After:
|
||||||
|
Restore
|
||||||
|
|
||||||
Execute(The standard handler should parse lines correctly):
|
Execute(The standard handler should parse lines correctly):
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
Before:
|
Before:
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
runtime autoload/ale/lsp.vim
|
runtime autoload/ale/lsp.vim
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
|
|
||||||
let g:args = []
|
let g:args = []
|
||||||
|
|
||||||
" Mock the StartProgram function so we can just capture the arguments.
|
" Mock the StartProgram function so we can just capture the arguments.
|
||||||
|
@ -9,6 +13,8 @@ Before:
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
After:
|
After:
|
||||||
|
Restore
|
||||||
|
|
||||||
unlet! g:args
|
unlet! g:args
|
||||||
|
|
||||||
runtime autoload/ale/lsp.vim
|
runtime autoload/ale/lsp.vim
|
||||||
|
|
|
@ -10,7 +10,9 @@ Before:
|
||||||
Save g:ale_set_loclist
|
Save g:ale_set_loclist
|
||||||
Save g:ale_set_quickfix
|
Save g:ale_set_quickfix
|
||||||
Save g:ale_set_signs
|
Save g:ale_set_signs
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
let g:ale_buffer_info = {}
|
let g:ale_buffer_info = {}
|
||||||
let g:ale_run_synchronously = 1
|
let g:ale_run_synchronously = 1
|
||||||
unlet! g:ale_run_synchronously_callbacks
|
unlet! g:ale_run_synchronously_callbacks
|
||||||
|
|
|
@ -6,7 +6,9 @@ Before:
|
||||||
Save g:ale_set_loclist
|
Save g:ale_set_loclist
|
||||||
Save g:ale_set_quickfix
|
Save g:ale_set_quickfix
|
||||||
Save g:ale_set_signs
|
Save g:ale_set_signs
|
||||||
|
Save g:ale_command_wrapper
|
||||||
|
|
||||||
|
let g:ale_command_wrapper = ''
|
||||||
let g:ale_buffer_info = {}
|
let g:ale_buffer_info = {}
|
||||||
let g:ale_run_synchronously = 1
|
let g:ale_run_synchronously = 1
|
||||||
let g:ale_set_signs = 1
|
let g:ale_set_signs = 1
|
||||||
|
|
Reference in a new issue