diff options
author | fenuks <fenuks@protonmail.com> | 2018-04-18 01:10:51 +0200 |
---|---|---|
committer | fenuks <fenuks@protonmail.com> | 2018-04-18 02:13:24 +0200 |
commit | f16384f323e34d0f555db4364b155bf1a03a5372 (patch) | |
tree | 64b26f97af65ff162bd7e540ab256047e26e21fc /test/fix/test_ale_fix_completion.vader | |
parent | a591b191db819f2c78a852936bd9742a831f56cb (diff) | |
download | ale-f16384f323e34d0f555db4364b155bf1a03a5372.zip |
Add tests for ALEFix commandline parameters
Diffstat (limited to 'test/fix/test_ale_fix_completion.vader')
-rw-r--r-- | test/fix/test_ale_fix_completion.vader | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/fix/test_ale_fix_completion.vader b/test/fix/test_ale_fix_completion.vader new file mode 100644 index 00000000..6c38bb8d --- /dev/null +++ b/test/fix/test_ale_fix_completion.vader @@ -0,0 +1,23 @@ +Execute (List of available fixers is empty): + call ale#fix#registry#Clear() + +Then (List of applicable fixers for python file is empty): + AssertEqual [], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add ruby fixer): + call ale#fix#registry#Add('ruby_fixer', 'fixer_fun', ['ruby'], 'ruby fixer') + +Then (List of applicable fixers for python file is still empty): + AssertEqual [], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add generic fixer): + call ale#fix#registry#Add('generic_fixer', 'fixer_fun', [], 'generic fixer') + +Then (Generic fixer should be returned as applicable for python file): + AssertEqual ['generic_fixer'], ale#fix#registry#GetApplicableFixers('python') + +Execute (Add python fixer): + call ale#fix#registry#Add('python_fixer', 'fixer_func', ['python'], 'python fixer') + +Then (List of fixers should contain both generic and python fixers): + AssertEqual ['generic_fixer', 'python_fixer'], ale#fix#registry#GetApplicableFixers('python') |