summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2021-03-14 23:34:38 +0000
committerw0rp <devw0rp@gmail.com>2021-03-14 23:34:38 +0000
commitf43e4abc8872a10519309d78f44ad2fc276ad596 (patch)
treeaf7d8f7b161ded500fc3698d02ea97d5b49d3793 /test/handler
parentb45ee8ec6c760089c68fb28a5436ec8275ca5381 (diff)
downloadale-f43e4abc8872a10519309d78f44ad2fc276ad596.zip
Check user systemd unit files with systemd-analyze
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_systemd_analyze_hander.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/handler/test_systemd_analyze_hander.vader b/test/handler/test_systemd_analyze_hander.vader
new file mode 100644
index 00000000..c7d668e0
--- /dev/null
+++ b/test/handler/test_systemd_analyze_hander.vader
@@ -0,0 +1,19 @@
+Before:
+ runtime ale_linters/systemd/systemd_analyze.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The systemd-analyze handler should parse lines correctly):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 9,
+ \ 'col': 1,
+ \ 'type': 'W',
+ \ 'text': 'Unknown key name ''Wat'' in section ''Service'', ignoring.',
+ \ },
+ \ ],
+ \ ale_linters#systemd#systemd_analyze#Handle(bufnr(''), [
+ \ '/home/user/.config/systemd/user/foo.service:9: Unknown key name ''Wat'' in section ''Service'', ignoring.',
+ \ ])