summaryrefslogtreecommitdiff
path: root/test/test_lint_file_linters.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-07 23:47:41 +0100
committerw0rp <devw0rp@gmail.com>2017-07-07 23:47:41 +0100
commit8eb4f95766350b7a1f80eae691f390faee045e6d (patch)
tree8d3973d0226c83d129fa8c2292befb5adf601759 /test/test_lint_file_linters.vader
parent46225f3bb13a242bf3b218d395f3911f013d5f14 (diff)
downloadale-8eb4f95766350b7a1f80eae691f390faee045e6d.zip
#697 - Clear all highlights every time items are set again, and refactor most things. Clear errors when linters are removed
Diffstat (limited to 'test/test_lint_file_linters.vader')
-rw-r--r--test/test_lint_file_linters.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_lint_file_linters.vader b/test/test_lint_file_linters.vader
index a02ecca3..b0dc1eb3 100644
--- a/test/test_lint_file_linters.vader
+++ b/test/test_lint_file_linters.vader
@@ -69,6 +69,10 @@ Before:
\ 'read_buffer': 0,
\})
+ let g:filename = tempname()
+ call writefile([], g:filename)
+ call ale#test#SetFilename(g:filename)
+
After:
Restore
@@ -79,6 +83,12 @@ After:
delfunction LintFileCallback
delfunction BufferCallback
+ if filereadable(g:filename)
+ call delete(g:filename)
+ endif
+
+ unlet g:filename
+
Given foobar (Some imaginary filetype):
foo
bar
@@ -107,6 +117,9 @@ Execute(Running linters without 'lint_file' should run only buffer linters):
Execute(Running linters with 'lint_file' should run all linters):
call ale#ResetLintFileMarkers()
let g:ale_buffer_info = {}
+
+ Assert filereadable(expand('%:p')), 'The file was not readable'
+
call ale#Queue(0, 'lint_file')
AssertEqual [
@@ -139,6 +152,9 @@ Execute(Running linters with 'lint_file' should run all linters):
Execute(Linter errors from files should be kept):
call ale#ResetLintFileMarkers()
let g:ale_buffer_info = {}
+
+ Assert filereadable(expand('%:p')), 'The file was not readable'
+
call ale#Queue(0, 'lint_file')
" Change the results for the buffer callback.