summaryrefslogtreecommitdiff
path: root/test/test_ale_fix.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-18 23:50:06 +0100
committerw0rp <devw0rp@gmail.com>2017-05-20 19:02:36 +0100
commit1f4d1800e0040d7d36d1c19e15c5f0e570122273 (patch)
tree145c0783768883c2814bcb9984d3e07299e66e7a /test/test_ale_fix.vader
parentea1627f5ce5620806644a525f5dc8523187fd69f (diff)
downloadale-1f4d1800e0040d7d36d1c19e15c5f0e570122273.zip
Allow function aliases to be registered for fixing problems, and add some more argument checking for fixing problems
Diffstat (limited to 'test/test_ale_fix.vader')
-rw-r--r--test/test_ale_fix.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_ale_fix.vader b/test/test_ale_fix.vader
index 8ec7896d..a872f38e 100644
--- a/test/test_ale_fix.vader
+++ b/test/test_ale_fix.vader
@@ -37,6 +37,7 @@ After:
delfunction DoNothing
delfunction CatLine
delfunction ReplaceWithTempFile
+ call ale#fix#registry#ResetToDefaults()
Given testft (A file with three lines):
a
@@ -126,3 +127,18 @@ Expect(The first function should be used):
^a
^b
^c
+
+Execute(ALEFix should complain for missing functions):
+ let g:ale_fixers.testft = ['XXX', 'YYY']
+ AssertThrows ALEFix
+ AssertEqual 'Vim(echoerr):Invalid fixers used: [''XXX'', ''YYY'']', g:vader_exception
+
+Execute(ALEFix should use functions from the registry):
+ call ale#fix#registry#Add('add_carets', 'AddCarets', [], 'Add some carets')
+ let g:ale_fixers.testft = ['add_carets']
+ ALEFix
+
+Expect(The registry function should be used):
+ ^a
+ ^b
+ ^c