summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2020-08-16 21:19:07 +0100
committerw0rp <devw0rp@gmail.com>2020-08-16 21:20:08 +0100
commit5c778e1ae752163a849609318ace6c3c6a37d6f7 (patch)
treee63994ca0e20c554caa31b43f7e1a5fa62795b4d /test
parent5ceda0164c5fae0d61fd51d4c9e083b27abdc9d2 (diff)
downloadale-5c778e1ae752163a849609318ace6c3c6a37d6f7.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/fix/test_ale_fix.vader2
-rw-r--r--test/fixers/test_eslint_fixer_callback.vader4
-rw-r--r--test/fixers/test_prettier_eslint_fixer.callback.vader3
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader3
-rw-r--r--test/handler/test_glslang_handler.vader3
-rw-r--r--test/handler/test_standard_handler.vader8
-rw-r--r--test/lsp/test_lsp_command_formatting.vader6
-rw-r--r--test/sign/test_linting_sets_signs.vader2
-rw-r--r--test/sign/test_sign_placement.vader2
9 files changed, 33 insertions, 0 deletions
diff --git a/test/fix/test_ale_fix.vader b/test/fix/test_ale_fix.vader
index c3dd20e4..6081f4e2 100644
--- a/test/fix/test_ale_fix.vader
+++ b/test/fix/test_ale_fix.vader
@@ -5,12 +5,14 @@ Before:
Save g:ale_fix_on_save
Save g:ale_lint_on_save
Save g:ale_echo_cursor
+ Save g:ale_command_wrapper
silent! cd /testplugin/test/fix
unlet! b:ale_lint_on_save
let g:ale_enabled = 0
let g:ale_echo_cursor = 0
+ let g:ale_command_wrapper = ''
let g:ale_run_synchronously = 1
let g:ale_set_lists_synchronously = 1
let g:ale_fix_buffer_data = {}
diff --git a/test/fixers/test_eslint_fixer_callback.vader b/test/fixers/test_eslint_fixer_callback.vader
index 400267ac..50fc6672 100644
--- a/test/fixers/test_eslint_fixer_callback.vader
+++ b/test/fixers/test_eslint_fixer_callback.vader
@@ -1,7 +1,11 @@
Before:
call ale#assert#SetUpFixerTest('javascript', 'eslint')
+ Save g:ale_command_wrapper
+
runtime autoload/ale/handlers/eslint.vim
+ let g:ale_command_wrapper = ''
+
After:
call ale#assert#TearDownFixerTest()
diff --git a/test/fixers/test_prettier_eslint_fixer.callback.vader b/test/fixers/test_prettier_eslint_fixer.callback.vader
index 90e11672..f7bb3c61 100644
--- a/test/fixers/test_prettier_eslint_fixer.callback.vader
+++ b/test/fixers/test_prettier_eslint_fixer.callback.vader
@@ -1,5 +1,8 @@
Before:
call ale#assert#SetUpFixerTest('javascript', 'prettier_eslint')
+ Save g:ale_command_wrapper
+
+ let g:ale_command_wrapper = ''
After:
call ale#assert#TearDownFixerTest()
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 062ae8cf..1087a160 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -1,5 +1,8 @@
Before:
call ale#assert#SetUpFixerTest('javascript', 'prettier')
+ Save g:ale_command_wrapper
+
+ let g:ale_command_wrapper = ''
silent cd ..
silent cd command_callback
diff --git a/test/handler/test_glslang_handler.vader b/test/handler/test_glslang_handler.vader
index d51c9852..6d3a7999 100644
--- a/test/handler/test_glslang_handler.vader
+++ b/test/handler/test_glslang_handler.vader
@@ -1,3 +1,6 @@
+Before:
+ runtime ale_linters/glsl/glslang.vim
+
Execute(The glsl glslang handler should parse lines correctly):
AssertEqual
\ [
diff --git a/test/handler/test_standard_handler.vader b/test/handler/test_standard_handler.vader
index 59ebe531..31e3a36b 100644
--- a/test/handler/test_standard_handler.vader
+++ b/test/handler/test_standard_handler.vader
@@ -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):
AssertEqual
\ [
diff --git a/test/lsp/test_lsp_command_formatting.vader b/test/lsp/test_lsp_command_formatting.vader
index ec3b4120..2c1e8788 100644
--- a/test/lsp/test_lsp_command_formatting.vader
+++ b/test/lsp/test_lsp_command_formatting.vader
@@ -1,6 +1,10 @@
Before:
+ Save g:ale_command_wrapper
+
runtime autoload/ale/lsp.vim
+ let g:ale_command_wrapper = ''
+
let g:args = []
" Mock the StartProgram function so we can just capture the arguments.
@@ -9,6 +13,8 @@ Before:
endfunction
After:
+ Restore
+
unlet! g:args
runtime autoload/ale/lsp.vim
diff --git a/test/sign/test_linting_sets_signs.vader b/test/sign/test_linting_sets_signs.vader
index 1d1f9802..1624449a 100644
--- a/test/sign/test_linting_sets_signs.vader
+++ b/test/sign/test_linting_sets_signs.vader
@@ -10,7 +10,9 @@ Before:
Save g:ale_set_loclist
Save g:ale_set_quickfix
Save g:ale_set_signs
+ Save g:ale_command_wrapper
+ let g:ale_command_wrapper = ''
let g:ale_buffer_info = {}
let g:ale_run_synchronously = 1
unlet! g:ale_run_synchronously_callbacks
diff --git a/test/sign/test_sign_placement.vader b/test/sign/test_sign_placement.vader
index d8d05b28..7b80d83c 100644
--- a/test/sign/test_sign_placement.vader
+++ b/test/sign/test_sign_placement.vader
@@ -6,7 +6,9 @@ Before:
Save g:ale_set_loclist
Save g:ale_set_quickfix
Save g:ale_set_signs
+ Save g:ale_command_wrapper
+ let g:ale_command_wrapper = ''
let g:ale_buffer_info = {}
let g:ale_run_synchronously = 1
let g:ale_set_signs = 1