summaryrefslogtreecommitdiff
path: root/test/handler/test_mcs_handler.vader
diff options
context:
space:
mode:
authorXristoph Hintermüller <christoph@out-world.com>2017-09-26 09:19:53 +0200
committerXristoph Hintermüller <christoph@out-world.com>2017-09-27 13:21:05 +0200
commit8f6044b8b64b608196a28b8125719be8736932bd (patch)
tree03fe4e437a4b7ace6244fee0ad4acf802c76976e /test/handler/test_mcs_handler.vader
parent0be77c60c59072a8895cde3fea38669391cff010 (diff)
downloadale-8f6044b8b64b608196a28b8125719be8736932bd.zip
Implemented review recommendations
Implements suggestions and recommendations suggested by the first review of the "Advance C# linter based on mcs -t:module (#952)" pull request. - Clarifies and simplifies description of linters and options - Added links to help file and marked the mcsc linter as to be run only when file in buffer is saved or loaded. - Added comments to the mcsc.vim file to clarify code - removed type checks considered not necessary be reviewer. - addresses findings by vader - removed call to getcwd and cd in vim script - handler expands file names relative to route of source tree into absolute pathes. Fixes errors not being marked when vim is started from subdirectory of source tree. - implements tests for mcs.vim and mcsc.vim linter
Diffstat (limited to 'test/handler/test_mcs_handler.vader')
-rw-r--r--test/handler/test_mcs_handler.vader34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/handler/test_mcs_handler.vader b/test/handler/test_mcs_handler.vader
new file mode 100644
index 00000000..75a764a3
--- /dev/null
+++ b/test/handler/test_mcs_handler.vader
@@ -0,0 +1,34 @@
+Before:
+ runtime ale_linters/cs/mcs.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The mcs handler should handle cannot find symbol errors):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 12,
+ \ 'col' : 29,
+ \ 'text': 'error CS1001: ; expected',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 101,
+ \ 'col': 0,
+ \ 'text': 'error CS1028: Unexpected processor directive (no #if for this #endif)',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 10,
+ \ 'col': 12,
+ \ 'text': 'warning CS0123: some warning',
+ \ 'type': 'W',
+ \ },
+ \ ],
+ \ ale_linters#cs#mcs#Handle(347, [
+ \ 'Tests.cs(12,29): error CS1001: ; expected',
+ \ 'Tests.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)',
+ \ 'Tests.cs(10,12): warning CS0123: some warning',
+ \ 'Compilation failed: 2 error(s), 1 warnings',
+ \ ])