diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-11-16 11:06:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 11:06:27 +0000 |
commit | 1f4f19cbd422e30ae95e63df6fae26d99651dc03 (patch) | |
tree | 39255eada4da9fd253a64556688c8c7888c37cb5 /test | |
parent | 3ddb858881c7b18ec8dae03ab915e5bb453f0286 (diff) | |
parent | eda20d0585567b22befa0e011324aaa91b9bebca (diff) | |
download | ale-1f4f19cbd422e30ae95e63df6fae26d99651dc03.zip |
Merge pull request #1133 from nicwest/linter-clj-joker
add joker handler for clojure
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_clojure_joker_handler.vader | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/test/handler/test_clojure_joker_handler.vader b/test/handler/test_clojure_joker_handler.vader new file mode 100644 index 00000000..460c62e8 --- /dev/null +++ b/test/handler/test_clojure_joker_handler.vader @@ -0,0 +1,75 @@ +Before: + runtime ale_linters/clojure/joker.vim + +After: + call ale#linter#Reset() + +Execute(the clojure joker handler should be able to handle errors): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:123:44: Read error: Unexpected )', + \ ]) + +Execute(the clojure joker handler should be able to handle warnings): + AssertEqual + \ [ + \ { + \ 'lnum': 654, + \ 'col': 321, + \ 'type': 'W', + \ 'text': 'Parse warning: let form with empty body', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:654:321: Parse warning: let form with empty body' + \ ]) + +Execute(the clojure joker handler should be able to handle exceptions): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 321, + \ 'type': 'E', + \ 'text': 'Exception: something horrible happen', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'test.clj:123:321: Exception: something horrible happen' + \ ]) + +Execute(the clojure joker handler should be able to handle errors from stdin): + AssertEqual + \ [ + \ { + \ 'lnum': 16, + \ 'col': 1, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ }, + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ '<stdin>:16:1: Read error: Unexpected )', + \ ]) + +Execute(the clojure joker handler should be able to handle windows files): + AssertEqual + \ [ + \ { + \ 'lnum': 123, + \ 'col': 44, + \ 'type': 'E', + \ 'text': 'Read error: Unexpected )', + \ } + \ ], + \ ale_linters#clojure#joker#HandleJokerFormat(0, [ + \ 'C:\my\operating\system\is\silly\core.clj:123:44: Read error: Unexpected )', + \ ]) |