From 3d2bddf4af7515a6f2b20cf6b5bb8fa5568a1a99 Mon Sep 17 00:00:00 2001 From: w0rp Date: Wed, 13 Sep 2017 23:30:32 +0100 Subject: [PATCH] Get some more random tests to pass on Windows --- test/handler/test_cuda_nvcc_handler.vader | 18 +++++++++++++++--- test/handler/test_flow_handler.vader | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/test/handler/test_cuda_nvcc_handler.vader b/test/handler/test_cuda_nvcc_handler.vader index 03297ab..40e3192 100644 --- a/test/handler/test_cuda_nvcc_handler.vader +++ b/test/handler/test_cuda_nvcc_handler.vader @@ -1,3 +1,9 @@ +Before: + runtime ale_linters/cuda/nvcc.vim + +After: + call ale#linter#Reset() + Execute(The cuda nvcc handler should parse errors from multiple files for NVCC 8.0): AssertEqual \ [ @@ -5,19 +11,25 @@ Execute(The cuda nvcc handler should parse errors from multiple files for NVCC 8 \ 'lnum': 1, \ 'type': 'E', \ 'text': 'this declaration has no storage class or type specifier', - \ 'filename': '/tmp/cudatest/test.cu', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\test.cu' + \ : '/tmp/cudatest/test.cu', \ }, \ { \ 'lnum': 2, \ 'type': 'E', \ 'text': 'attribute "global" does not apply here', - \ 'filename': '/tmp/cudatest/common.h', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\common.h' + \ : '/tmp/cudatest/common.h', \ }, \ { \ 'lnum': 2, \ 'type': 'E', \ 'text': 'expected a ";"', - \ 'filename': '/tmp/cudatest/common.h', + \ 'filename': has('win32') + \ ? 'C:\tmp\cudatest\common.h' + \ : '/tmp/cudatest/common.h', \ }, \ ], \ ale_linters#cuda#nvcc#HandleNVCCFormat(0, [ diff --git a/test/handler/test_flow_handler.vader b/test/handler/test_flow_handler.vader index 288610b..f7a847c 100644 --- a/test/handler/test_flow_handler.vader +++ b/test/handler/test_flow_handler.vader @@ -38,7 +38,7 @@ Execute(The flow handler should process errors correctly.): \ "descr": "number", \ "type": "Blame", \ "loc": { - \ "source": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "source": expand('%:p:h'), \ "type": "SourceFile", \ "start": { \ "line": 417, @@ -51,7 +51,7 @@ Execute(The flow handler should process errors correctly.): \ "offset": 9504 \ } \ }, - \ "path": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "path": expand('%:p:h'), \ "line": 417, \ "endline": 417, \ "start": 10, @@ -72,7 +72,7 @@ Execute(The flow handler should process errors correctly.): \ "descr": "array type", \ "type": "Blame", \ "loc": { - \ "source": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "source": expand('%:p:h'), \ "type": "SourceFile", \ "start": { \ "line": 416, @@ -85,7 +85,7 @@ Execute(The flow handler should process errors correctly.): \ "offset": 9491 \ } \ }, - \ "path": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "path": expand('%:p:h'), \ "line": 416, \ "endline": 416, \ "start": 43, @@ -102,7 +102,7 @@ Execute(The flow handler should process errors correctly.): \ "descr": "unreachable code", \ "type": "Blame", \ "loc": { - \ "source": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "source": expand('%:p:h'), \ "type": "SourceFile", \ "start": { \ "line": 419, @@ -115,7 +115,7 @@ Execute(The flow handler should process errors correctly.): \ "offset": 9626 \ } \ }, - \ "path": "/home/w0rp/Downloads/graphql-js/src/language/parser.js", + \ "path": expand('%:p:h'), \ "line": 419, \ "endline": 421, \ "start": 3, @@ -156,7 +156,7 @@ Execute(The flow handler should fetch the correct location for the currently ope \ "descr": "React element `Foo`", \ "type": "Blame", \ "loc": { - \ "source": "/Users/rav/Projects/vim-ale-flow/index.js", + \ "source": expand('%:p:h'), \ "type": "SourceFile", \ "start": { \ "line": 6, @@ -169,7 +169,7 @@ Execute(The flow handler should fetch the correct location for the currently ope \ "offset": 108 \ } \ }, - \ "path": "/Users/rav/Projects/vim-ale-flow/index.js", + \ "path": expand('%:p:h'), \ "line": 6, \ "endline": 6, \ "start": 3, @@ -214,7 +214,7 @@ Execute(The flow handler should fetch the correct location for the currently ope \ "descr": "props of React element `Foo`", \ "type": "Blame", \ "loc": { - \ "source": "/Users/rav/Projects/vim-ale-flow/index.js", + \ "source": expand('%:p:h'), \ "type": "SourceFile", \ "start": { \ "line": 6, @@ -227,7 +227,7 @@ Execute(The flow handler should fetch the correct location for the currently ope \ "offset": 108 \ } \ }, - \ "path": "/Users/rav/Projects/vim-ale-flow/index.js", + \ "path": expand('%:p:h'), \ "line": 6, \ "endline": 6, \ "start": 3,