summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-09 23:42:54 +0000
committerw0rp <devw0rp@gmail.com>2017-11-09 23:42:54 +0000
commitd425b8a18ab3c8155fdc7376192434f8878e954f (patch)
tree8a702b7b398fe43e9b8b3a05e3011b3ca530fd83 /test/command_callback
parentc1fa88e78ccfeb98a688a209cd9f67da1bf076aa (diff)
downloadale-d425b8a18ab3c8155fdc7376192434f8878e954f.zip
Simplfy semver handling and share the semver version cache across everything
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_cargo_command_callbacks.vader1
-rw-r--r--test/command_callback/test_flake8_command_callback.vader11
2 files changed, 8 insertions, 4 deletions
diff --git a/test/command_callback/test_cargo_command_callbacks.vader b/test/command_callback/test_cargo_command_callbacks.vader
index d808e197..10535516 100644
--- a/test/command_callback/test_cargo_command_callbacks.vader
+++ b/test/command_callback/test_cargo_command_callbacks.vader
@@ -17,6 +17,7 @@ After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
+ call ale#semver#ResetVersionCache()
Execute(An empty string should be returned for the cargo executable when there's no Cargo.toml file):
AssertEqual
diff --git a/test/command_callback/test_flake8_command_callback.vader b/test/command_callback/test_flake8_command_callback.vader
index a510f4c1..47d5c0fd 100644
--- a/test/command_callback/test_flake8_command_callback.vader
+++ b/test/command_callback/test_flake8_command_callback.vader
@@ -23,7 +23,7 @@ After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
- call ale_linters#python#flake8#ClearVersionCache()
+ call ale#semver#ResetVersionCache()
Execute(The flake8 callbacks should return the correct default values):
AssertEqual
@@ -35,8 +35,9 @@ Execute(The flake8 callbacks should return the correct default values):
AssertEqual
\ ale#Escape('flake8') . ' --format=default --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.0'])
+
" Try with older versions.
- call ale_linters#python#flake8#ClearVersionCache()
+ call ale#semver#ResetVersionCache()
AssertEqual
\ ale#Escape('flake8') . ' --format=default -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['2.9.9'])
@@ -49,7 +50,9 @@ Execute(The flake8 command callback should let you set options):
\ . ' --some-option --format=default'
\ . ' --stdin-display-name %s -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['3.0.4'])
- call ale_linters#python#flake8#ClearVersionCache()
+
+ call ale#semver#ResetVersionCache()
+
AssertEqual
\ ale#Escape('flake8')
\ . ' --some-option --format=default -',
@@ -140,7 +143,7 @@ Execute(Using `python -m flake8` should be supported for running flake8):
\ ale#Escape('python') . ' -m flake8 --some-option --format=default -',
\ ale_linters#python#flake8#GetCommand(bufnr(''), ['2.9.9'])
- call ale_linters#python#flake8#ClearVersionCache()
+ call ale#semver#ResetVersionCache()
" Leading spaces shouldn't matter
let g:ale_python_flake8_options = ' -m flake8 --some-option'