summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-12-19 18:23:09 +0000
committerw0rp <devw0rp@gmail.com>2017-12-19 18:23:09 +0000
commit1568bf81281507aaaa8c71af85e244e94bd2924c (patch)
tree4694f6d24b82b6b57a7b934aebe68ea1c09ec57b /test/handler
parent73f61514c9039e7e863da3544f251d3f8d7d1956 (diff)
downloadale-1568bf81281507aaaa8c71af85e244e94bd2924c.zip
Fix the mscs tests on Windows, and use the improved Simplify for all tests instead.v1.7.0
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_brakeman_handler.vader4
-rw-r--r--test/handler/test_ghc_handler.vader12
-rw-r--r--test/handler/test_gobuild_handler.vader2
-rw-r--r--test/handler/test_gometalinter_handler.vader4
-rw-r--r--test/handler/test_javac_handler.vader4
-rw-r--r--test/handler/test_lessc_handler.vader6
-rw-r--r--test/handler/test_mcsc_handler.vader8
-rw-r--r--test/handler/test_mypy_handler.vader10
-rw-r--r--test/handler/test_perl_handler.vader6
-rw-r--r--test/handler/test_rstcheck_lint_handler.vader6
-rw-r--r--test/handler/test_rust_handler.vader10
-rw-r--r--test/handler/test_tslint_handler.vader12
12 files changed, 42 insertions, 42 deletions
diff --git a/test/handler/test_brakeman_handler.vader b/test/handler/test_brakeman_handler.vader
index 5a398799..02eb31b0 100644
--- a/test/handler/test_brakeman_handler.vader
+++ b/test/handler/test_brakeman_handler.vader
@@ -34,7 +34,7 @@ Execute(The brakeman handler should parse JSON correctly):
\ '"fingerprint": "1234",',
\ '"check_name": "SQL",',
\ '"message": "Possible SQL injection",',
- \ '"file": "' . substitute(ale#path#Winify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",',
+ \ '"file": "' . substitute(ale#path#Simplify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",',
\ '"line": 84,',
\ '"link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",',
\ '"code": "Thing.connection.execute(params[:data])",',
@@ -53,7 +53,7 @@ Execute(The brakeman handler should parse JSON correctly):
\ '"fingerprint": "1235",',
\ '"check_name": "ModelAttrAccessible",',
\ '"message": "Potentially dangerous attribute available for mass assignment",',
- \ '"file": "' . substitute(ale#path#Winify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",',
+ \ '"file": "' . substitute(ale#path#Simplify('app/models/thing.rb'), '\\', '\\\\', 'g') . '",',
\ '"line": null,',
\ '"link": "http://brakemanscanner.org/docs/warning_types/mass_assignment/",',
\ '"code": ":name",',
diff --git a/test/handler/test_ghc_handler.vader b/test/handler/test_ghc_handler.vader
index 2a26f863..b040a234 100644
--- a/test/handler/test_ghc_handler.vader
+++ b/test/handler/test_ghc_handler.vader
@@ -48,11 +48,11 @@ Execute(The ghc handler should handle ghc 8 output):
\ ],
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
\ '',
- \ ale#path#Winify('src/Appoint/Lib.hs') . ':6:1: error:',
+ \ ale#path#Simplify('src/Appoint/Lib.hs') . ':6:1: error:',
\ ' Failed to load interface for ‘GitHub.Data’',
\ ' Use -v to see a list of the files searched for.',
\ '',
- \ ale#path#Winify('src/Appoint/Lib.hs') . ':7:1: warning:',
+ \ ale#path#Simplify('src/Appoint/Lib.hs') . ':7:1: warning:',
\ ' Failed to load interface for ‘GitHub.Endpoints.PullRequests’',
\ ' Use -v to see a list of the files searched for.',
\ ])
@@ -92,12 +92,12 @@ Execute(The ghc handler should handle ghc 7 output):
\ },
\ ],
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
- \ ale#path#Winify('src/Main.hs') . ':168:1:',
+ \ ale#path#Simplify('src/Main.hs') . ':168:1:',
\ ' parse error (possibly incorrect indentation or mismatched brackets)',
- \ ale#path#Winify('src/Main.hs') . ':84:1:Warning:',
+ \ ale#path#Simplify('src/Main.hs') . ':84:1:Warning:',
\ ' Top-level binding with no type signature:',
\ ' myLayout :: Choose Tall (Choose (Mirror Tall) Full) a',
- \ ale#path#Winify('src/Main.hs') . ':94:5:Error:',
+ \ ale#path#Simplify('src/Main.hs') . ':94:5:Error:',
\ ' Some other error',
\ ])
@@ -122,7 +122,7 @@ Execute(The ghc handler should handle stack 1.5.1 output):
\ },
\ ],
\ ale#handlers#haskell#HandleGHCFormat(bufnr(''), [
- \ ' ' . ale#path#Winify('src/Main.hs') . ':160:14: error:',
+ \ ' ' . ale#path#Simplify('src/Main.hs') . ':160:14: error:',
\ ' • Expecting one fewer arguments to ‘Exp’',
\ ' Expected kind ‘k0 -> *’, but ‘Exp’ has kind ‘*’',
\ ' • In the type ‘Exp a’',
diff --git a/test/handler/test_gobuild_handler.vader b/test/handler/test_gobuild_handler.vader
index ec77f9c4..17608c3a 100644
--- a/test/handler/test_gobuild_handler.vader
+++ b/test/handler/test_gobuild_handler.vader
@@ -37,7 +37,7 @@ Execute (The gobuild handler should handle relative paths correctly):
\ 'col': 0,
\ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args',
\ 'type': 'E',
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.go'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'),
\ },
\ ],
\ ale_linters#go#gobuild#Handler(bufnr(''), [
diff --git a/test/handler/test_gometalinter_handler.vader b/test/handler/test_gometalinter_handler.vader
index 703040e2..1aade8a7 100644
--- a/test/handler/test_gometalinter_handler.vader
+++ b/test/handler/test_gometalinter_handler.vader
@@ -41,14 +41,14 @@ Execute (The gometalinter handler should handle paths correctly):
\ 'col': 3,
\ 'text': 'expected ''package'', found ''IDENT'' gibberish (staticcheck)',
\ 'type': 'W',
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.go'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'),
\ },
\ {
\ 'lnum': 37,
\ 'col': 5,
\ 'text': 'expected ''package'', found ''IDENT'' gibberish (golint)',
\ 'type': 'E',
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.go'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.go'),
\ },
\ ],
\ ale_linters#go#gometalinter#Handler(bufnr(''), [
diff --git a/test/handler/test_javac_handler.vader b/test/handler/test_javac_handler.vader
index 6189e6e1..ff4e1631 100644
--- a/test/handler/test_javac_handler.vader
+++ b/test/handler/test_javac_handler.vader
@@ -69,13 +69,13 @@ Execute(The javac handler should resolve files from different directories):
AssertEqual
\ [
\ {
- \ 'filename': ale#path#Winify(g:dir . '/Foo.java'),
+ \ 'filename': ale#path#Simplify(g:dir . '/Foo.java'),
\ 'lnum': 1,
\ 'text': 'error: some error',
\ 'type': 'E',
\ },
\ {
- \ 'filename': ale#path#Winify(g:dir . '/Bar.java'),
+ \ 'filename': ale#path#Simplify(g:dir . '/Bar.java'),
\ 'lnum': 1,
\ 'text': 'error: some error',
\ 'type': 'E',
diff --git a/test/handler/test_lessc_handler.vader b/test/handler/test_lessc_handler.vader
index 530c5824..31de5593 100644
--- a/test/handler/test_lessc_handler.vader
+++ b/test/handler/test_lessc_handler.vader
@@ -32,14 +32,14 @@ Execute(The lessc handler should handle errors for other files in the same direc
\ 'col': 1,
\ 'type': 'E',
\ 'text': 'Unrecognised input. Possibly missing something',
- \ 'filename': ale#path#Winify(g:dir . '/imported.less')
+ \ 'filename': ale#path#Simplify(g:dir . '/imported.less')
\ },
\ {
\ 'lnum': 2,
\ 'col': 1,
\ 'type': 'E',
\ 'text': 'Unrecognised input. Possibly missing something',
- \ 'filename': ale#path#Winify(g:dir . '/imported.less')
+ \ 'filename': ale#path#Simplify(g:dir . '/imported.less')
\ },
\ ],
\ ale_linters#less#lessc#Handle(bufnr(''), [
@@ -59,7 +59,7 @@ Execute(The lessc handler should handle errors for files in directories above co
\ 'col': 1,
\ 'type': 'E',
\ 'text': 'Unrecognised input. Possibly missing something',
- \ 'filename': ale#path#Winify(g:dir . '/../imported2.less')
+ \ 'filename': ale#path#Simplify(g:dir . '/../imported2.less')
\ },
\ ],
\ ale_linters#less#lessc#Handle(bufnr(''), [
diff --git a/test/handler/test_mcsc_handler.vader b/test/handler/test_mcsc_handler.vader
index d97a2edc..ac55ee81 100644
--- a/test/handler/test_mcsc_handler.vader
+++ b/test/handler/test_mcsc_handler.vader
@@ -18,7 +18,7 @@ Execute(The mcs handler should work with the default of the buffer's directory):
\ 'text': '; expected',
\ 'code': 'CS1001',
\ 'type': 'E',
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/Test.cs', 'add_drive'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/Test.cs'),
\ },
\ ],
\ ale_linters#cs#mcsc#Handle(347, [
@@ -37,7 +37,7 @@ Execute(The mcs handler should handle cannot find symbol errors):
\ 'text': '; expected',
\ 'code': 'CS1001',
\ 'type': 'E',
- \ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
+ \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
\ },
\ {
\ 'lnum': 101,
@@ -45,7 +45,7 @@ Execute(The mcs handler should handle cannot find symbol errors):
\ 'text': 'Unexpected processor directive (no #if for this #endif)',
\ 'code': 'CS1028',
\ 'type': 'E',
- \ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
+ \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
\ },
\ {
\ 'lnum': 10,
@@ -53,7 +53,7 @@ Execute(The mcs handler should handle cannot find symbol errors):
\ 'text': 'some warning',
\ 'code': 'CS0123',
\ 'type': 'W',
- \ 'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
+ \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
\ },
\ ],
\ ale_linters#cs#mcsc#Handle(347, [
diff --git a/test/handler/test_mypy_handler.vader b/test/handler/test_mypy_handler.vader
index a3e224f3..abb8504a 100644
--- a/test/handler/test_mypy_handler.vader
+++ b/test/handler/test_mypy_handler.vader
@@ -15,35 +15,35 @@ Execute(The mypy handler should parse lines correctly):
\ {
\ 'lnum': 768,
\ 'col': 38,
- \ 'filename': ale#path#Winify(g:dir . '/baz.py'),
+ \ 'filename': ale#path#Simplify(g:dir . '/baz.py'),
\ 'type': 'E',
\ 'text': 'Cannot determine type of ''SOME_SYMBOL''',
\ },
\ {
\ 'lnum': 821,
\ 'col': 38,
- \ 'filename': ale#path#Winify(g:dir . '/baz.py'),
+ \ 'filename': ale#path#Simplify(g:dir . '/baz.py'),
\ 'type': 'E',
\ 'text': 'Cannot determine type of ''SOME_SYMBOL''',
\ },
\ {
\ 'lnum': 38,
\ 'col': 44,
- \ 'filename': ale#path#Winify(g:dir . '/other.py'),
+ \ 'filename': ale#path#Simplify(g:dir . '/other.py'),
\ 'type': 'E',
\ 'text': 'Cannot determine type of ''ANOTHER_SYMBOL''',
\ },
\ {
\ 'lnum': 15,
\ 'col': 3,
- \ 'filename': ale#path#Winify(g:dir . '/__init__.py'),
+ \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'),
\ 'type': 'E',
\ 'text': 'Argument 1 to "somefunc" has incompatible type "int"; expected "str"'
\ },
\ {
\ 'lnum': 72,
\ 'col': 1,
- \ 'filename': ale#path#Winify(g:dir . '/__init__.py'),
+ \ 'filename': ale#path#Simplify(g:dir . '/__init__.py'),
\ 'type': 'W',
\ 'text': 'Some warning',
\ },
diff --git a/test/handler/test_perl_handler.vader b/test/handler/test_perl_handler.vader
index 9e1c5203..75e8f226 100644
--- a/test/handler/test_perl_handler.vader
+++ b/test/handler/test_perl_handler.vader
@@ -15,9 +15,9 @@ Execute(The Perl linter should ignore errors from other files):
\ {'lnum': '2', 'type': 'E', 'text': 'Compilation failed in require'},
\ ],
\ ale_linters#perl#perl#Handle(bufnr(''), [
- \ 'syntax error at ' . ale#path#Winify(g:dir . '/foo.pm') . ' line 4, near "aklsdfjmy "',
- \ 'Compilation failed in require at ' . ale#path#Winify(g:dir . '/bar.pl') . ' line 2.',
- \ 'BEGIN failed--compilation aborted at ' . ale#path#Winify(g:dir . '/bar.pl') . ' line 2.',
+ \ 'syntax error at ' . ale#path#Simplify(g:dir . '/foo.pm') . ' line 4, near "aklsdfjmy "',
+ \ 'Compilation failed in require at ' . ale#path#Simplify(g:dir . '/bar.pl') . ' line 2.',
+ \ 'BEGIN failed--compilation aborted at ' . ale#path#Simplify(g:dir . '/bar.pl') . ' line 2.',
\ ])
Execute(The Perl linter should complain about failing to locate modules):
diff --git a/test/handler/test_rstcheck_lint_handler.vader b/test/handler/test_rstcheck_lint_handler.vader
index 928c599b..3b4ac037 100644
--- a/test/handler/test_rstcheck_lint_handler.vader
+++ b/test/handler/test_rstcheck_lint_handler.vader
@@ -8,21 +8,21 @@ Execute(Warning and error messages should be handled correctly):
AssertEqual
\ [
\ {
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/bad_python.rst'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/bad_python.rst'),
\ 'lnum': 7,
\ 'col': 0,
\ 'type': 'W',
\ 'text': '(python) unexpected EOF while parsing',
\ },
\ {
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/bad_cpp.rst'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/bad_cpp.rst'),
\ 'lnum': 9,
\ 'col': 0,
\ 'type': 'W',
\ 'text': '(cpp) error: ''x'' was not declared in this scope',
\ },
\ {
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/bad_rst.rst'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/bad_rst.rst'),
\ 'lnum': 1,
\ 'col': 0,
\ 'type': 'E',
diff --git a/test/handler/test_rust_handler.vader b/test/handler/test_rust_handler.vader
index a1481036..05bd1e94 100644
--- a/test/handler/test_rust_handler.vader
+++ b/test/handler/test_rust_handler.vader
@@ -110,7 +110,7 @@ Execute(The Rust handler should handle cargo output):
\ 'byte_start': 11505,
\ 'column_end': 8,
\ 'column_start': 5,
- \ 'file_name': ale#path#Winify('src/playpen.rs'),
+ \ 'file_name': ale#path#Simplify('src/playpen.rs'),
\ 'is_primary': v:true,
\ 'label': v:null,
\ 'line_end': 15,
@@ -130,7 +130,7 @@ Execute(The Rust handler should handle cargo output):
\ 'byte_start': 11494,
\ 'column_end': 10,
\ 'column_start': 7,
- \ 'file_name': ale#path#Winify('src/playpen.rs'),
+ \ 'file_name': ale#path#Simplify('src/playpen.rs'),
\ 'is_primary': v:true,
\ 'label': v:null,
\ 'line_end': 13,
@@ -174,7 +174,7 @@ Execute(The Rust handler should should errors from expansion spans):
\ 'byte_start': 1,
\ 'column_end': 1,
\ 'column_start': 1,
- \ 'file_name': ale#path#Winify('src/other.rs'),
+ \ 'file_name': ale#path#Simplify('src/other.rs'),
\ 'is_primary': v:true,
\ 'label': 'some other error',
\ 'line_end': 4,
@@ -185,7 +185,7 @@ Execute(The Rust handler should should errors from expansion spans):
\ 'byte_start': 52,
\ 'column_end': 23,
\ 'column_start': 21,
- \ 'file_name': ale#path#Winify('src/playpen.rs'),
+ \ 'file_name': ale#path#Simplify('src/playpen.rs'),
\ 'is_primary': v:true,
\ 'label': 'expected bool, found integral variable',
\ 'line_end': 4,
@@ -227,7 +227,7 @@ Execute(The Rust handler should show detailed errors):
\ 'column_end': 23,
\ 'column_start': 21,
\ 'expansion': v:null,
- \ 'file_name': ale#path#Winify('src/playpen.rs'),
+ \ 'file_name': ale#path#Simplify('src/playpen.rs'),
\ 'is_primary': v:true,
\ 'label': 'expected bool, found integral variable',
\ 'line_end': 4,
diff --git a/test/handler/test_tslint_handler.vader b/test/handler/test_tslint_handler.vader
index 8d263efa..32036edf 100644
--- a/test/handler/test_tslint_handler.vader
+++ b/test/handler/test_tslint_handler.vader
@@ -27,7 +27,7 @@ Execute(The tslint handler should parse lines correctly):
\ {
\ 'lnum': 1,
\ 'col': 15,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'),
\ 'end_lnum': 1,
\ 'type': 'E',
\ 'end_col': 15,
@@ -37,7 +37,7 @@ Execute(The tslint handler should parse lines correctly):
\ {
\ 'lnum': 2,
\ 'col': 8,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'),
\ 'end_lnum': 3,
\ 'type': 'W',
\ 'end_col': 12,
@@ -46,7 +46,7 @@ Execute(The tslint handler should parse lines correctly):
\ {
\ 'lnum': 2,
\ 'col': 8,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/something-else.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/something-else.ts'),
\ 'end_lnum': 3,
\ 'type': 'W',
\ 'end_col': 12,
@@ -56,7 +56,7 @@ Execute(The tslint handler should parse lines correctly):
\ {
\ 'lnum': 31,
\ 'col': 9,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'),
\ 'end_lnum': 31,
\ 'type': 'E',
\ 'end_col': 20,
@@ -157,7 +157,7 @@ Execute(The tslint handler report errors for empty files by default):
\ {
\ 'lnum': 2,
\ 'col': 1,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'),
\ 'end_lnum': 2,
\ 'type': 'E',
\ 'end_col': 1,
@@ -231,7 +231,7 @@ Execute(The tslint handler should report errors when the ignore option is on, bu
\ {
\ 'lnum': 2,
\ 'col': 1,
- \ 'filename': ale#path#Winify(expand('%:p:h') . '/test.ts'),
+ \ 'filename': ale#path#Simplify(expand('%:p:h') . '/test.ts'),
\ 'end_lnum': 2,
\ 'type': 'E',
\ 'end_col': 1,