diff options
author | Nils Leuzinger <nilsl@student.ethz.ch> | 2018-04-05 21:04:11 +0200 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2018-04-05 21:04:11 +0200 |
commit | 912f632bf591377a69bf688f6a85668d93be8841 (patch) | |
tree | 2a970b78998ca400551c7ef7d025826f9207db76 /test/handler/test_scala_handler.vader | |
parent | a2acdecbc2d03fbf03e74835086532b62e60665c (diff) | |
download | ale-912f632bf591377a69bf688f6a85668d93be8841.zip |
Add fsc linter for Scala (#1452)
* Add fsc as a Scala linter
* Pull reused code into `autoload/ale/` directory
* Include fsc into the README
* Add unit test for testing the scala handler
* Add unit test for scala's fsc linter
* Rename scala unit tests for clarity
* Fix typo in README
* Fix typos in doc/ale.txt
* Fix author headline
* Put methods for fsc commands back into fsc.vim
* Move command_callback tests to correct location
* Rewrite handler test so it actually tests handler
* Clarify description of test in test_scala_handler
Diffstat (limited to 'test/handler/test_scala_handler.vader')
-rw-r--r-- | test/handler/test_scala_handler.vader | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/handler/test_scala_handler.vader b/test/handler/test_scala_handler.vader new file mode 100644 index 00000000..3214bdbc --- /dev/null +++ b/test/handler/test_scala_handler.vader @@ -0,0 +1,32 @@ +After: + call ale#linter#Reset() + +Execute(The handler should return an empty list with empty input): + AssertEqual [], ale#handlers#scala#HandleScalacLintFormat(bufnr(''), []) + +Execute(The handler should correctly parse error messages): + AssertEqual + \ [ + \ { + \ 'lnum': 4, + \ 'col': 8, + \ 'text': ''':'' expected but identifier found.', + \ 'type': 'E' + \ }, + \ { + \ 'lnum': 6, + \ 'col': 2, + \ 'text': 'identifier expected but eof found.', + \ 'type': 'E' + \ } + \ ], + \ ale#handlers#scala#HandleScalacLintFormat(bufnr(''), + \ [ + \ "hi.scala:4: error: ':' expected but identifier found.", + \ " Some stupid scala code", + \ " ^", + \ "hi.scala:6: error: identifier expected but eof found.", + \ ")", + \ " ^", + \ "two errors found", + \ ]) |