summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-10-01 18:41:41 +0100
committerw0rp <devw0rp@gmail.com>2017-10-01 18:41:41 +0100
commit4634b1be93adbeb1cbed2b9f25025b45d0c5015b (patch)
tree48dec8f838215d070d52c15a3bbb6ba03c4ee1d0 /test/handler
parent5731616cd27c6000a0ee788611b9299eebb9cf7f (diff)
downloadale-4634b1be93adbeb1cbed2b9f25025b45d0c5015b.zip
Fix Flow and Idris tests for Windows
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_flow_handler.vader8
-rw-r--r--test/handler/test_idris_handler.vader46
2 files changed, 29 insertions, 25 deletions
diff --git a/test/handler/test_flow_handler.vader b/test/handler/test_flow_handler.vader
index 5037fcb1..47efc30d 100644
--- a/test/handler/test_flow_handler.vader
+++ b/test/handler/test_flow_handler.vader
@@ -260,7 +260,7 @@ Execute(The flow handler should handle relative paths):
\ "descr": "React element `Foo`",
\ "type": "Blame",
\ "loc": {
- \ "source": "vim-ale-flow/index.js",
+ \ "source": expand('%:p'),
\ "type": "SourceFile",
\ "start": {
\ "line": 6,
@@ -273,7 +273,7 @@ Execute(The flow handler should handle relative paths):
\ "offset": 108
\ }
\ },
- \ "path": "vim-ale-flow/index.js",
+ \ "path": expand('%:p'),
\ "line": 6,
\ "endline": 6,
\ "start": 3,
@@ -318,7 +318,7 @@ Execute(The flow handler should handle relative paths):
\ "descr": "props of React element `Foo`",
\ "type": "Blame",
\ "loc": {
- \ "source": "vim-ale-flow/index.js",
+ \ "source": expand('%:p'),
\ "type": "SourceFile",
\ "start": {
\ "line": 6,
@@ -331,7 +331,7 @@ Execute(The flow handler should handle relative paths):
\ "offset": 108
\ }
\ },
- \ "path": "vim-ale-flow/index.js",
+ \ "path": expand('%:p'),
\ "line": 6,
\ "endline": 6,
\ "start": 3,
diff --git a/test/handler/test_idris_handler.vader b/test/handler/test_idris_handler.vader
index b1fb2a01..6a032ea6 100644
--- a/test/handler/test_idris_handler.vader
+++ b/test/handler/test_idris_handler.vader
@@ -12,7 +12,11 @@ After:
call ale#linter#Reset()
Execute(The idris handler should parse messages that reference a single column):
- call ale#test#SetFilename('/tmp/foo.idr')
+ if has('win32')
+ call ale#test#SetFilename($TEMP . '\foo.idr')
+ else
+ call ale#test#SetFilename('/tmp/foo.idr')
+ endif
AssertEqual
\ [
@@ -24,21 +28,21 @@ Execute(The idris handler should parse messages that reference a single column):
\ }
\ ],
\ ale_linters#idris#idris#Handle(bufnr(''), [
- \ '/tmp/foo.idr:4:5:',
- \ 'When checking right hand side of main with expected type',
- \ ' IO ()',
- \ '',
- \ 'When checking an application of function Prelude.Monad.>>=:',
- \ ' Type mismatch between',
- \ ' IO () (Type of putStrLn _)',
- \ ' and',
- \ ' _ -> _ (Is putStrLn _ applied to too many arguments?)',
- \ '',
- \ ' Specifically:',
- \ ' Type mismatch between',
- \ ' IO',
- \ ' and',
- \ ' \uv => _ -> uv',
+ \ expand('%:p') . ':4:5:',
+ \ 'When checking right hand side of main with expected type',
+ \ ' IO ()',
+ \ '',
+ \ 'When checking an application of function Prelude.Monad.>>=:',
+ \ ' Type mismatch between',
+ \ ' IO () (Type of putStrLn _)',
+ \ ' and',
+ \ ' _ -> _ (Is putStrLn _ applied to too many arguments?)',
+ \ '',
+ \ ' Specifically:',
+ \ ' Type mismatch between',
+ \ ' IO',
+ \ ' and',
+ \ ' \uv => _ -> uv',
\ ])
Execute(The idris handler should parse messages that reference a column range):
@@ -54,9 +58,9 @@ Execute(The idris handler should parse messages that reference a column range):
\ }
\ ],
\ ale_linters#idris#idris#Handle(bufnr(''), [
- \ '/tmp/foo.idr:11:11-13:',
- \ 'When checking right hand side of Main.case block in main at /tmp/foo.idr:10:10 with expected type',
- \ ' IO ()',
- \ '',
- \ 'Last statement in do block must be an expression',
+ \ expand('%:p') . ':11:11-13:',
+ \ 'When checking right hand side of Main.case block in main at /tmp/foo.idr:10:10 with expected type',
+ \ ' IO ()',
+ \ '',
+ \ 'Last statement in do block must be an expression',
\ ])