summaryrefslogtreecommitdiff
path: root/test/handler/test_fecs_handler.vader
diff options
context:
space:
mode:
authorharttle <yangjvn@126.com>2019-03-26 20:40:51 +0800
committerharttle <yangjvn@126.com>2019-04-11 16:24:58 +0800
commitc820089c4434b621e8b30fbe73bbf9d01ee44f6f (patch)
treedeff31ecaa7e2db9cde4cb791d1c47f4be55bc3c /test/handler/test_fecs_handler.vader
parent481316561445a4048a96a2c6bd41e9b623d8919f (diff)
downloadale-c820089c4434b621e8b30fbe73bbf9d01ee44f6f.zip
feat: fecs support for js/html/css lint and format
`fecs` is a lint tool for HTML/CSS/JavaScript, see http://fecs.baidu.com for more options.
Diffstat (limited to 'test/handler/test_fecs_handler.vader')
-rw-r--r--test/handler/test_fecs_handler.vader35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/handler/test_fecs_handler.vader b/test/handler/test_fecs_handler.vader
new file mode 100644
index 00000000..7c216b8d
--- /dev/null
+++ b/test/handler/test_fecs_handler.vader
@@ -0,0 +1,35 @@
+Before:
+ runtime autoload/ale/handlers/fecs.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(fecs should parse lines correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 20,
+ \ 'col': 25,
+ \ 'text': 'Unexpected console statement.',
+ \ 'code': 'no-console',
+ \ 'type': 'W',
+ \ },
+ \ {
+ \ 'lnum': 24,
+ \ 'col': 36,
+ \ 'text': 'Missing radix parameter.',
+ \ 'code': 'radix',
+ \ 'type': 'E',
+ \ },
+ \ {
+ \ 'lnum': 25,
+ \ 'col': 6,
+ \ 'text': 'Missing static property value.',
+ \ 'type': 'E',
+ \ },
+ \ ],
+ \ ale#handlers#fecs#Handle(347, [
+ \ 'fecs WARN → line 20, col 25: Unexpected console statement. (no-console)',
+ \ 'fecs ERROR → line 24, col 36: Missing radix parameter. (radix)',
+ \ 'fecs ERROR → line 25, col 6: Missing static property value.',
+ \ ])