summaryrefslogtreecommitdiff
path: root/test/handler/test_tslint_handler.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/handler/test_tslint_handler.vader')
-rw-r--r--test/handler/test_tslint_handler.vader28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/handler/test_tslint_handler.vader b/test/handler/test_tslint_handler.vader
index d6ed353b..78a24170 100644
--- a/test/handler/test_tslint_handler.vader
+++ b/test/handler/test_tslint_handler.vader
@@ -278,5 +278,31 @@ Execute(The tslint handler should not report no-implicit-dependencies errors):
\ 'character': 0,
\ 'line': 1,
\ 'position': 1
- \ }
+ \ },
\ }])])
+
+Execute(The tslint handler should set filename keys for temporary files):
+ " The temporay filename below is hacked into being a relative path so we can
+ " test that we resolve the temporary filename first.
+ AssertEqual
+ \ [
+ \ {'lnum': 47, 'col': 1, 'code': 'curly', 'end_lnum': 47, 'type': 'E', 'end_col': 26, 'text': 'if statements must be braced'},
+ \ ],
+ \ ale_linters#typescript#tslint#Handle(bufnr(''), [json_encode([
+ \ {
+ \ 'endPosition': {
+ \ 'character':25,
+ \ 'line':46,
+ \ 'position':1383,
+ \ },
+ \ 'failure': 'if statements must be braced',
+ \ 'name': substitute(substitute(expand('%:p'), '[^/\\]', '', 'g'), '.', '../', 'g') . tempname(),
+ \ 'ruleName': 'curly',
+ \ 'ruleSeverity':'ERROR',
+ \ 'startPosition': {
+ \ 'character':0,
+ \ 'line':46,
+ \ 'position':1358,
+ \ }
+ \ },
+ \ ])])